diff options
author | Sean Griffin <sean@seantheprogrammer.com> | 2015-09-24 14:28:30 -0600 |
---|---|---|
committer | Sean Griffin <sean@seantheprogrammer.com> | 2015-09-24 14:28:30 -0600 |
commit | 45735502ece2d351dea73079e5f340c48d1126e3 (patch) | |
tree | 765d89aae77195d7ef1e4fc3dd431ff0b5e2e619 /activerecord | |
parent | 136fc65c9b8b66e1fb56f3a17f0d1fddff9b4bd0 (diff) | |
download | rails-45735502ece2d351dea73079e5f340c48d1126e3.tar.gz rails-45735502ece2d351dea73079e5f340c48d1126e3.tar.bz2 rails-45735502ece2d351dea73079e5f340c48d1126e3.zip |
We still need to reset `@changed_attributes` in `changes_applied`
When I removed the call to `super` to avoid the setting of
`@previous_changes`, I forgot to duplicate the other part of that
behavior, which led to failing tests
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/attribute_methods/dirty.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/attribute_methods/dirty.rb b/activerecord/lib/active_record/attribute_methods/dirty.rb index 24f0ccb239..84b942d559 100644 --- a/activerecord/lib/active_record/attribute_methods/dirty.rb +++ b/activerecord/lib/active_record/attribute_methods/dirty.rb @@ -52,11 +52,13 @@ module ActiveRecord def changes_applied @previous_mutation_tracker = @mutation_tracker + @changed_attributes = HashWithIndifferentAccess.new store_original_attributes end def clear_changes_information @previous_mutation_tracker = nil + @changed_attributes = HashWithIndifferentAccess.new store_original_attributes end |