Chris Kampmeier
2009-May-11 08:19 UTC
Add #many? implementations for Scope and AssociationCollection
If anybody has a few spare cycles, I could use a few more reviewers for this patch: https://rails.lighthouseapp.com/projects/8994/tickets/1500-named-scopes-should-implement-many Basically, when we added Enumerable#many? for 2.2, we didn''t add corresponding methods to Scope and AssociationCollection so that they''d use a SQL COUNT instead of loading the entire collection. #any?, #none?, and friends work that way, which is much more efficient for some use cases. Thanks- Chris Kampmeier