Commit 4fd0068785fca5846960d7929a0fea4955a5b6bc

Authored by AntonioTerceiro
1 parent c15c2d0b

ActionItem96: only check for code uniqueness upon task creation



git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@693 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing 1 changed file with 1 additions and 1 deletions   Show diff stats
app/models/task.rb
... ... @@ -25,7 +25,7 @@ class Task < ActiveRecord::Base
25 25 belongs_to :requestor, :class_name => 'Person', :foreign_key => :requestor_id
26 26 belongs_to :target, :class_name => 'Profile', :foreign_key => :target_id
27 27  
28   - validates_uniqueness_of :code
  28 + validates_uniqueness_of :code, :on => :create
29 29 validates_presence_of :code
30 30  
31 31 attr_protected :status
... ...