diff options
author | Yves Senn <yves.senn@gmail.com> | 2013-12-28 04:42:31 -0800 |
---|---|---|
committer | Yves Senn <yves.senn@gmail.com> | 2013-12-28 04:42:31 -0800 |
commit | f66f483d900dfbcb6dfa2df9c6188663489475ab (patch) | |
tree | 567466ba4d7b036f27ac41de18d70e75a93c5788 /activerecord | |
parent | c60edddc0f75a26a89ba96de47d21e6a59d67e74 (diff) | |
parent | e8253d3a642d396d9646d082f97eb233a2b2396e (diff) | |
download | rails-f66f483d900dfbcb6dfa2df9c6188663489475ab.tar.gz rails-f66f483d900dfbcb6dfa2df9c6188663489475ab.tar.bz2 rails-f66f483d900dfbcb6dfa2df9c6188663489475ab.zip |
Merge pull request #13514 from kuldeepaggarwal/f-removed-warnings
Removed warnings: setting `changed_attributes` instance variable if it is already initialized.
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/persistence.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/persistence.rb b/activerecord/lib/active_record/persistence.rb index 309bb980e3..b94ef18fd5 100644 --- a/activerecord/lib/active_record/persistence.rb +++ b/activerecord/lib/active_record/persistence.rb @@ -181,7 +181,7 @@ module ActiveRecord became = klass.new became.instance_variable_set("@attributes", @attributes) became.instance_variable_set("@attributes_cache", @attributes_cache) - became.instance_variable_set("@changed_attributes", @changed_attributes) + became.instance_variable_set("@changed_attributes", @changed_attributes) if defined?(@changed_attributes) became.instance_variable_set("@new_record", new_record?) became.instance_variable_set("@destroyed", destroyed?) became.instance_variable_set("@errors", errors) |