Skip to content
This repository
Browse code

Update the documentation to reflect the change handling :group earlier

  • Loading branch information...
commit 4db7e8de1160de6c813a33266fa415849e25fba6 1 parent 4dae364
Michael Koziarski NZKoz authored
5 activerecord/lib/active_record/associations/has_many_association.rb
@@ -17,7 +17,10 @@ def owner_quoted_id
17 17 # Returns the number of records in this collection.
18 18 #
19 19 # If the association has a counter cache it gets that value. Otherwise
20   - # a count via SQL is performed, bounded to <tt>:limit</tt> if there's one.
  20 + # it will attempt to do a count via SQL, bounded to <tt>:limit</tt> if
  21 + # there's one. Some configuration options like :group make it impossible
  22 + # to do a SQL count, in those cases the array count will be used.
  23 + #
21 24 # That does not depend on whether the collection has already been loaded
22 25 # or not. The +size+ method is the one that takes the loaded flag into
23 26 # account and delegates to +count_records+ if needed.

0 comments on commit 4db7e8d

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