From b0bb41ad355771d4ae4704585f29bc12ae6c345d Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Fri, 22 Feb 2008 17:48:37 +0000 Subject: [PATCH] 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 --- app/models/custom_field.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.39.5