Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

empty? on named_scope should use count

#262

Currently, calling empty? on named_scope loads all results. Instead I think it should behave more like an association proxy which uses a count query if the results aren't loaded. This patch adds that behavior.

Reported by Ryan Bates · May 27th, 2008 @ 03:35 PM

State: resolved
Milestone: none
Assigned to: nobody
Importance: none

Activity

  1. Repository
    Repository
    • State changed from new to resolved

    (from [c2fbcba16d2349285368c86b849db946dc0e7d57]) Ensure named_scope#empty? uses count query. [#262 state:resolved]

    Signed-off-by: Pratik Naik

    http://github.com/rails/rails/co...

    May 28th, 2008 @ 04:07 PM