summaryrefslogtreecommitdiffstats
path: root/lib/plugins/acts_as_customizable
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2013-02-28 18:47:25 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2013-02-28 18:47:25 +0000
commit5c1e1ee4bb16e5418116d52f5793c3be6642a93e (patch)
treed33b5933bc278d6c4c1ca2b9dfc4d624fc9bb49a /lib/plugins/acts_as_customizable
parentf544dd682b7dbb04cb65dae66f59bc8c53bc81f2 (diff)
downloadredmine-5c1e1ee4bb16e5418116d52f5793c3be6642a93e.tar.gz
redmine-5c1e1ee4bb16e5418116d52f5793c3be6642a93e.zip
Fixed that #reload raises a Stack too deep error with ruby 2.0.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11497 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/plugins/acts_as_customizable')
-rw-r--r--lib/plugins/acts_as_customizable/lib/acts_as_customizable.rb4
1 files changed, 2 insertions, 2 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 28cefd4ef..1f1aa1e44 100644
--- a/lib/plugins/acts_as_customizable/lib/acts_as_customizable.rb
+++ b/lib/plugins/acts_as_customizable/lib/acts_as_customizable.rb
@@ -33,7 +33,6 @@ module Redmine
: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
@@ -43,6 +42,7 @@ module Redmine
module InstanceMethods
def self.included(base)
base.extend ClassMethods
+ base.send :alias_method_chain, :reload, :custom_fields
end
def available_custom_fields
@@ -154,7 +154,7 @@ module Redmine
@custom_field_values_changed = true
end
- def reload(*args)
+ def reload_with_custom_fields(*args)
@custom_field_values = nil
@custom_field_values_changed = false
reload_without_custom_fields(*args)