Show usefull error message for uniqueness_of_name with acts_as_paranoid.
Fixed #88 Conflicts: app/models/ordergroup.rb
This commit is contained in:
parent
0b66fe6d62
commit
3fb5c313ee
6 changed files with 29 additions and 6 deletions
|
|
@ -5,6 +5,7 @@ class Workgroup < Group
|
|||
# returns all non-finished tasks
|
||||
has_many :open_tasks, :class_name => 'Task', :conditions => ['done = ?', false], :order => 'due_date ASC'
|
||||
|
||||
validates_uniqueness_of :name
|
||||
validates_presence_of :task_name, :weekday, :task_required_users, :next_weekly_tasks_number,
|
||||
:if => :weekly_task
|
||||
validates_numericality_of :next_weekly_tasks_number, :greater_than => 0, :less_than => 21, :only_integer => true,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue