]> source.dussan.org Git - redmine.git/commitdiff
Removes a call to alias_method_chain.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Thu, 14 Jul 2016 07:34:12 +0000 (07:34 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Thu, 14 Jul 2016 07:34:12 +0000 (07:34 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@15657 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/issue.rb

index d5a78717d0e9d3a6f1ccf9683cf096a0bae156d1..862d60e483387ce39b489219acc3c43c29ef9456 100644 (file)
@@ -409,7 +409,7 @@ class Issue < ActiveRecord::Base
   end
 
   # Overrides assign_attributes so that project and tracker get assigned first
-  def assign_attributes_with_project_and_tracker_first(new_attributes, *args)
+  def assign_attributes(new_attributes, *args)
     return if new_attributes.nil?
     attrs = new_attributes.dup
     attrs.stringify_keys!
@@ -419,10 +419,8 @@ class Issue < ActiveRecord::Base
         send "#{attr}=", attrs.delete(attr)
       end
     end
-    send :assign_attributes_without_project_and_tracker_first, attrs, *args
+    super attrs, *args
   end
-  # Do not redefine alias chain on reload (see #4838)
-  alias_method_chain(:assign_attributes, :project_and_tracker_first) unless method_defined?(:assign_attributes_without_project_and_tracker_first)
 
   def attributes=(new_attributes)
     assign_attributes new_attributes