Some improved validations for task.
This commit is contained in:
parent
197516b7fc
commit
185376d53d
1 changed files with 1 additions and 1 deletions
|
@ -11,7 +11,7 @@ class Task < ActiveRecord::Base
|
|||
attr_protected :users
|
||||
|
||||
validates_length_of :name, :minimum => 3
|
||||
validates_numericality_of :duration, :in => 1..3
|
||||
validates_numericality_of :duration, :required_users, :only_integer => true, :greater_than => 1
|
||||
|
||||
after_save :update_ordergroup_stats
|
||||
|
||||
|
|
Loading…
Reference in a new issue