From: Jean-Philippe Lang Date: Fri, 22 Feb 2008 17:48:37 +0000 (+0000) Subject: Fixed: Issue custom fields "required" flag not stored (broken by r1090). Closes ... X-Git-Tag: 0.7.0-RC1~117 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=b0bb41ad355771d4ae4704585f29bc12ae6c345d;p=redmine.git Fixed: Issue custom fields "required" flag not stored (broken by r1090). Closes #715. git-svn-id: http://redmine.rubyforge.org/svn/trunk@1171 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/app/models/custom_field.rb b/app/models/custom_field.rb index 6be081b0b..990adf9e2 100644 --- a/app/models/custom_field.rb +++ b/app/models/custom_field.rb @@ -55,7 +55,7 @@ class CustomField < ActiveRecord::Base end # validate default value - v = CustomValue.new(:custom_field => self.dup, :value => default_value, :customized => nil) + v = CustomValue.new(:custom_field => self.clone, :value => default_value, :customized => nil) v.custom_field.is_required = false errors.add(:default_value, :activerecord_error_invalid) unless v.valid? end