summaryrefslogtreecommitdiffstats
path: root/vendor
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2011-11-22 20:54:51 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2011-11-22 20:54:51 +0000
commit9fa6b263507b762ba7e89461b87fbc9e9508f578 (patch)
tree3a8cbec7f6ff397070abcc3cfa2a50d1ba7d297a /vendor
parent8a8162c74352c487e0dbfa813f3b97b38a80d0a4 (diff)
downloadredmine-9fa6b263507b762ba7e89461b87fbc9e9508f578.tar.gz
redmine-9fa6b263507b762ba7e89461b87fbc9e9508f578.zip
before_validation_on_create callback removed in Rails 3.1.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7886 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'vendor')
-rw-r--r--vendor/plugins/acts_as_customizable/lib/acts_as_customizable.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/vendor/plugins/acts_as_customizable/lib/acts_as_customizable.rb b/vendor/plugins/acts_as_customizable/lib/acts_as_customizable.rb
index 10ba12341..a09dffbb5 100644
--- a/vendor/plugins/acts_as_customizable/lib/acts_as_customizable.rb
+++ b/vendor/plugins/acts_as_customizable/lib/acts_as_customizable.rb
@@ -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