diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2013-02-11 17:38:30 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2013-02-11 17:38:30 +0000 |
commit | 514f2d6c0fa6e1eb8e1f7f1a1dbb733dc81776dd (patch) | |
tree | c7a20f127d09fcd7348c0db01ef98a84e85e7e41 /lib/plugins | |
parent | eed4954f0a43883b4ced7aa32f152538816b8d96 (diff) | |
download | redmine-514f2d6c0fa6e1eb8e1f7f1a1dbb733dc81776dd.tar.gz redmine-514f2d6c0fa6e1eb8e1f7f1a1dbb733dc81776dd.zip |
Fixed that custom_field_values are not reloaded on #reload (#13119).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11349 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/plugins')
-rw-r--r-- | lib/plugins/acts_as_customizable/lib/acts_as_customizable.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/plugins/acts_as_customizable/lib/acts_as_customizable.rb b/lib/plugins/acts_as_customizable/lib/acts_as_customizable.rb index e896d921c..28cefd4ef 100644 --- a/lib/plugins/acts_as_customizable/lib/acts_as_customizable.rb +++ b/lib/plugins/acts_as_customizable/lib/acts_as_customizable.rb @@ -32,6 +32,8 @@ module Redmine :order => "#{CustomField.table_name}.position", :dependent => :delete_all, :validate => false + + send :alias_method, :reload_without_custom_fields, :reload send :include, Redmine::Acts::Customizable::InstanceMethods validate :validate_custom_field_values after_save :save_custom_field_values @@ -152,6 +154,12 @@ module Redmine @custom_field_values_changed = true end + def reload(*args) + @custom_field_values = nil + @custom_field_values_changed = false + reload_without_custom_fields(*args) + end + module ClassMethods end end |