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.

ActiveRecord::find_in_batches bug or feature?

#2128

yeilding within with_scope propogates scope of the results of queries inside the yielded block

is it a designed feature/behavior or just a bug?

more info at

http://ep.blogware.com/blog/_arc...

Reported by Evgeniy Pirogov · March 4th, 2009 @ 07:28 PM

State: duplicate
Milestone: 2.x
Assigned to: DHH DHH
Importance: none

Activity

  1. Evgeniy Pirogov
    Evgeniy Pirogov

    typo

    yeilding within with_scope propogates scope to the queries inside the yielded block

    March 4th, 2009 @ 07:29 PM

  2. eric.tipton (at gmail)
    eric.tipton (at gmail)

    nice catch, check out bug 2128: http://rails.lighthouseapp.com/p...

    I applied a fix for this to the latest version of batches.rb attached to that bug (comment #1)

    March 24th, 2009 @ 09:06 AM

  3. Benjamin Stein
    Benjamin Stein

    Evgeniy or Eric, did you ever reach a resolution here? This ticket is still marked incomplete, as is #2128 (http://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/.... Eric's patch was for 2 separate issues and didn't directly address the problem in this ticket.

    If it has stalled, I'd be happy to write the failing spec & patch. I agree with the original post; I think it needs fixing.

    May 18th, 2009 @ 08:26 PM

  4. Matthew Beale
  5. Matt Jones
    Matt Jones
    • State changed from new to duplicate

    Closing this as a duplicate of #2227.

    October 26th, 2009 @ 03:20 AM