From 83d6cc4815debe2086073387ecbf38c0f47cfec5 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Fri, 14 Apr 2017 10:46:07 -0700 Subject: Move around AR::Dirty and fix _attribute method We already have a _read_attribute method that can get the value we need from the model. Lets define that method in AM::Dirty and use the existing one from AR::Dirty rather than introducing a new method. --- activerecord/lib/active_record/attribute_methods/dirty.rb | 4 ---- 1 file changed, 4 deletions(-) (limited to 'activerecord/lib') diff --git a/activerecord/lib/active_record/attribute_methods/dirty.rb b/activerecord/lib/active_record/attribute_methods/dirty.rb index 63978cfb3e..bd5003d63a 100644 --- a/activerecord/lib/active_record/attribute_methods/dirty.rb +++ b/activerecord/lib/active_record/attribute_methods/dirty.rb @@ -328,10 +328,6 @@ module ActiveRecord def clear_changed_attributes_cache remove_instance_variable(:@cached_changed_attributes) if defined?(@cached_changed_attributes) end - - def _attributes(attr) - _read_attribute(attr) - end end end end -- cgit v1.2.3