]> source.dussan.org Git - redmine.git/commitdiff
Fixed: SystemStackError (stack level too deep) on Issue#attributes= after model reloa...
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 14 Feb 2010 12:43:48 +0000 (12:43 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 14 Feb 2010 12:43:48 +0000 (12:43 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3427 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/issue.rb

index e833441092a5d683f94624098942936124cbf9da..93d8b2c4fbbcf6098086ce4f69a2efe53168233e 100644 (file)
@@ -159,7 +159,8 @@ class Issue < ActiveRecord::Base
     end
     send :attributes_without_tracker_first=, new_attributes, *args
   end
-  alias_method_chain :attributes=, :tracker_first
+  # Do not redefine alias chain on reload (see #4838)
+  alias_method_chain(:attributes=, :tracker_first) unless method_defined?(:attributes_without_tracker_first=)
   
   def estimated_hours=(h)
     write_attribute :estimated_hours, (h.is_a?(String) ? h.to_hours : h)