]> source.dussan.org Git - redmine.git/commitdiff
before_validation_on_create callback removed in Rails 3.1.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Tue, 22 Nov 2011 20:54:51 +0000 (20:54 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Tue, 22 Nov 2011 20:54:51 +0000 (20:54 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7886 e93f8b46-1217-0410-a6f0-8f06a7374b81

vendor/plugins/acts_as_customizable/lib/acts_as_customizable.rb

index 10ba123415afda681f83827019f7aed6d20ae1f0..a09dffbb52c41553c352c317a080819bb4b94179 100644 (file)
@@ -31,7 +31,7 @@ module Redmine
                                    :include => :custom_field,
                                    :order => "#{CustomField.table_name}.position",
                                    :dependent => :delete_all
-          before_validation_on_create { |customized| customized.custom_field_values }
+          before_validation { |customized| customized.custom_field_values if customized.new_record? }
           # Trigger validation only if custom values were changed
           validates_associated :custom_values, :on => :update, :if => Proc.new { |customized| customized.custom_field_values_changed? }
           send :include, Redmine::Acts::Customizable::InstanceMethods