Skip to content

Commit

Permalink
read_attribute is public, so we should just call it
Browse files Browse the repository at this point in the history
  • Loading branch information
tenderlove committed Apr 13, 2014
1 parent 4baa866 commit feb88bd
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def insert_record(record, validate = true, raise = false)
# the loaded flag is set to true as well. # the loaded flag is set to true as well.
def count_records def count_records
count = if has_cached_counter? count = if has_cached_counter?
owner.send(:read_attribute, cached_counter_attribute_name) owner.read_attribute cached_counter_attribute_name
else else
scope.count scope.count
end end
Expand Down

0 comments on commit feb88bd

Please sign in to comment.