From 834716b2ee107ed95c21a308be6b1983411ccd66 Mon Sep 17 00:00:00 2001 From: Ryuta Kamizono Date: Wed, 3 Apr 2019 14:49:11 +0900 Subject: Don't assign to `@changed_attributes` in `becomes` `@changed_attributes` is no longer used since #30985. --- activerecord/lib/active_record/persistence.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/activerecord/lib/active_record/persistence.rb b/activerecord/lib/active_record/persistence.rb index a87b9e7db2..bf2f61737b 100644 --- a/activerecord/lib/active_record/persistence.rb +++ b/activerecord/lib/active_record/persistence.rb @@ -568,7 +568,6 @@ module ActiveRecord became.send(:initialize) became.instance_variable_set("@attributes", @attributes) became.instance_variable_set("@mutations_from_database", @mutations_from_database ||= nil) - became.instance_variable_set("@changed_attributes", attributes_changed_by_setter) became.instance_variable_set("@new_record", new_record?) became.instance_variable_set("@destroyed", destroyed?) became.errors.copy!(errors) -- cgit v1.2.3