diff options
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/attribute_methods/dirty.rb | 2 | ||||
-rw-r--r-- | activerecord/lib/active_record/attribute_mutation_tracker.rb | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/attribute_methods/dirty.rb b/activerecord/lib/active_record/attribute_methods/dirty.rb index e8a782ed13..0bcfa5f00d 100644 --- a/activerecord/lib/active_record/attribute_methods/dirty.rb +++ b/activerecord/lib/active_record/attribute_methods/dirty.rb @@ -133,7 +133,7 @@ module ActiveRecord end def previous_mutation_tracker - @previous_mutation_tracker ||= NullMutationTracker.new + @previous_mutation_tracker ||= NullMutationTracker.instance end def cache_changed_attributes diff --git a/activerecord/lib/active_record/attribute_mutation_tracker.rb b/activerecord/lib/active_record/attribute_mutation_tracker.rb index ba7348918b..0133b4d0be 100644 --- a/activerecord/lib/active_record/attribute_mutation_tracker.rb +++ b/activerecord/lib/active_record/attribute_mutation_tracker.rb @@ -46,6 +46,8 @@ module ActiveRecord end class NullMutationTracker # :nodoc: + include Singleton + def changed_values {} end |