diff options
author | Robin Dupret <robin.dupret@gmail.com> | 2017-02-06 14:27:08 +0100 |
---|---|---|
committer | Robin Dupret <robin.dupret@gmail.com> | 2017-02-19 22:06:12 +0100 |
commit | e532531939a610c3a1ba4594d325b10a0c9b4546 (patch) | |
tree | 377843c41a67eaa8b0d3a2161549981edba61baa /activerecord/lib | |
parent | 4f2aa162ed3dc419fa1a7880ecd77d47ba28a8d3 (diff) | |
download | rails-e532531939a610c3a1ba4594d325b10a0c9b4546.tar.gz rails-e532531939a610c3a1ba4594d325b10a0c9b4546.tar.bz2 rails-e532531939a610c3a1ba4594d325b10a0c9b4546.zip |
Deprecate the top-level `HashWithIndifferentAccess` contant
This constant was kept for the sake of backward compatibility; it
is still available under `ActiveSupport::HashWithIndifferentAccess`.
Furthermore, since Ruby 2.5 (https://bugs.ruby-lang.org/issues/11547)
won't support top level constant lookup, people would have to update
their code anyway.
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/attribute_methods/dirty.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/attribute_methods/dirty.rb b/activerecord/lib/active_record/attribute_methods/dirty.rb index 31c1e687dc..6aa414ba6b 100644 --- a/activerecord/lib/active_record/attribute_methods/dirty.rb +++ b/activerecord/lib/active_record/attribute_methods/dirty.rb @@ -50,7 +50,7 @@ module ActiveRecord super.tap do @previous_mutation_tracker = nil clear_mutation_trackers - @changed_attributes = HashWithIndifferentAccess.new + @changed_attributes = ActiveSupport::HashWithIndifferentAccess.new end end @@ -70,13 +70,13 @@ module ActiveRecord def changes_applied @previous_mutation_tracker = mutation_tracker - @changed_attributes = HashWithIndifferentAccess.new + @changed_attributes = ActiveSupport::HashWithIndifferentAccess.new clear_mutation_trackers end def clear_changes_information @previous_mutation_tracker = nil - @changed_attributes = HashWithIndifferentAccess.new + @changed_attributes = ActiveSupport::HashWithIndifferentAccess.new forget_attribute_assignments clear_mutation_trackers end |