Some fixes for tasks.
This commit is contained in:
parent
03d84aed1d
commit
2e56bfe895
12 changed files with 53 additions and 87 deletions
|
|
@ -9,9 +9,10 @@ class Task < ActiveRecord::Base
|
|||
|
||||
# form will send user in string. responsibilities will added later
|
||||
attr_protected :users
|
||||
|
||||
validates_length_of :name, :minimum => 3
|
||||
validates_numericality_of :duration, :required_users, :only_integer => true, :greater_than => 1
|
||||
|
||||
validates :name, :presence => true, :length => { :minimum => 3 }
|
||||
validates :required_users, :presence => true
|
||||
validates_numericality_of :duration, :required_users, :only_integer => true, :greater_than => 0
|
||||
|
||||
after_save :update_ordergroup_stats
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue