This project is archived and is in readonly mode.
ActiveRecord::find_in_batches bug or feature?
-
Evgeniy Pirogov
typo
yeilding within with_scope propogates scope to the queries inside the yielded block
-
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)
-
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.
-
Matthew Beale
I've got the scope fix in:
https://rails.lighthouseapp.com/projects/8994/tickets/2227-batches-...
With tests and all. As Benjamin mentioned, this ticket is also following the same issue:
https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets...