diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2014-04-13 15:44:01 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2014-04-13 15:44:09 -0700 |
commit | feb88bda5484c2af13daec768f47d46e9ab4879e (patch) | |
tree | d8955be00803fa3f402310811d85c3db9e63b728 /activerecord/lib | |
parent | 4baa866e35a2c08aa236ac83c061e3343e951a49 (diff) | |
download | rails-feb88bda5484c2af13daec768f47d46e9ab4879e.tar.gz rails-feb88bda5484c2af13daec768f47d46e9ab4879e.tar.bz2 rails-feb88bda5484c2af13daec768f47d46e9ab4879e.zip |
read_attribute is public, so we should just call it
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/associations/has_many_association.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/associations/has_many_association.rb b/activerecord/lib/active_record/associations/has_many_association.rb index 3e4b7902c0..aac85a36c8 100644 --- a/activerecord/lib/active_record/associations/has_many_association.rb +++ b/activerecord/lib/active_record/associations/has_many_association.rb @@ -58,7 +58,7 @@ module ActiveRecord # the loaded flag is set to true as well. def count_records count = if has_cached_counter? - owner.send(:read_attribute, cached_counter_attribute_name) + owner.read_attribute cached_counter_attribute_name else scope.count end |