Some improved validations for task.

This commit is contained in:
benni 2011-05-13 22:43:23 +02:00
parent a689bdd5f5
commit 8da229316c

View file

@ -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