Commit f8a93d801c202cfc160c170643802a58268cb35c
Committed by
Fabio Teixeira
1 parent
c388a509
Exists in
master
and in
5 other branches
Add acronym validation
Signed-off-by: Luciano Prestes <lucianopcbr@gmail.com> Signed-off-by: Gustavo Jaruga <darksshades@hotmail.com>
Showing
1 changed file
with
2 additions
and
0 deletions
Show diff stats
lib/software_info.rb
@@ -15,6 +15,8 @@ class SoftwareInfo < ActiveRecord::Base | @@ -15,6 +15,8 @@ class SoftwareInfo < ActiveRecord::Base | ||
15 | has_one :software_categories | 15 | has_one :software_categories |
16 | 16 | ||
17 | validates_length_of :finality, :maximum => 100 | 17 | validates_length_of :finality, :maximum => 100 |
18 | + | ||
19 | + validate :validate_acronym | ||
18 | 20 | ||
19 | # used on find_by_contents | 21 | # used on find_by_contents |
20 | scope :like_search, lambda{ |name| | 22 | scope :like_search, lambda{ |name| |