From 5c1e1ee4bb16e5418116d52f5793c3be6642a93e Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Thu, 28 Feb 2013 18:47:25 +0000 Subject: 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 --- lib/plugins/acts_as_customizable/lib/acts_as_customizable.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/plugins/acts_as_customizable') 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) -- cgit v1.2.3