From 4fd0068785fca5846960d7929a0fea4955a5b6bc Mon Sep 17 00:00:00 2001 From: AntonioTerceiro Date: Sat, 13 Oct 2007 13:40:13 +0000 Subject: [PATCH] ActionItem96: only check for code uniqueness upon task creation --- app/models/task.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/task.rb b/app/models/task.rb index 71adf58..4311443 100644 --- a/app/models/task.rb +++ b/app/models/task.rb @@ -25,7 +25,7 @@ class Task < ActiveRecord::Base belongs_to :requestor, :class_name => 'Person', :foreign_key => :requestor_id belongs_to :target, :class_name => 'Profile', :foreign_key => :target_id - validates_uniqueness_of :code + validates_uniqueness_of :code, :on => :create validates_presence_of :code attr_protected :status -- libgit2 0.21.2