summaryrefslogtreecommitdiffstats
path: root/app/models/custom_value.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2011-12-18 14:57:58 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2011-12-18 14:57:58 +0000
commit9e83ee2ddf3caf2b6b9887a1426bc610cd3364ad (patch)
treec1681d73a107d46ed968b39523e9a42054c93806 /app/models/custom_value.rb
parent062fbeae80477b8e5a95b2e5222f98b7e94c70b7 (diff)
downloadredmine-9e83ee2ddf3caf2b6b9887a1426bc610cd3364ad.tar.gz
redmine-9e83ee2ddf3caf2b6b9887a1426bc610cd3364ad.zip
Removed after_initialize methods.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8288 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/custom_value.rb')
-rw-r--r--app/models/custom_value.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/custom_value.rb b/app/models/custom_value.rb
index dae8f73ef..6cb4853f9 100644
--- a/app/models/custom_value.rb
+++ b/app/models/custom_value.rb
@@ -21,7 +21,8 @@ class CustomValue < ActiveRecord::Base
validate :validate_custom_value
- def after_initialize
+ def initialize(attributes=nil, *args)
+ super
if new_record? && custom_field && (customized_type.blank? || (customized && customized.new_record?))
self.value ||= custom_field.default_value
end