Skip to content
Browse files

read_attribute is public, so we should just call it

  • Loading branch information...
1 parent 4baa866 commit feb88bda5484c2af13daec768f47d46e9ab4879e @tenderlove tenderlove committed
Showing with 1 addition and 1 deletion.
  1. +1 −1 activerecord/lib/active_record/associations/has_many_association.rb
View
2 activerecord/lib/active_record/associations/has_many_association.rb
@@ -58,7 +58,7 @@ def insert_record(record, validate = true, raise = false)
# 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

0 comments on commit feb88bd

Please sign in to comment.
Something went wrong with that request. Please try again.