Removed after_initialize methods.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8288 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2011-12-18 14:57:58 +00:00
parent 062fbeae80
commit 9e83ee2ddf
8 changed files with 14 additions and 11 deletions
+2 -1
View File
@@ -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