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
This commit is contained in:
Jean-Philippe Lang 2011-11-22 20:54:51 +00:00
parent 8a8162c743
commit 9fa6b26350
1 changed files with 1 additions and 1 deletions

View 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