Skip to content

Commit

Permalink
Merge pull request rails#13514 from kuldeepaggarwal/f-removed-warnings
Browse files Browse the repository at this point in the history
Removed warnings: setting `changed_attributes` instance variable if it is already initialized.
  • Loading branch information
senny committed Dec 28, 2013
2 parents c60eddd + e8253d3 commit f66f483
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion activerecord/lib/active_record/persistence.rb
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ def becomes(klass)
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)
Expand Down

0 comments on commit f66f483

Please sign in to comment.