This project is archived and is in readonly mode.
ActiveRecord::find_in_batches bug or feature?
Reported by Evgeniy Pirogov | March 4th, 2009 @ 07:28 PM | in 2.x
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
Comments and changes to this ticket
-
Evgeniy Pirogov March 4th, 2009 @ 07:29 PM
typo
yeilding within with_scope propogates scope to the queries inside the yielded block
-
eric.tipton (at gmail) March 24th, 2009 @ 09:06 AM
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 May 18th, 2009 @ 08:26 PM
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 June 5th, 2009 @ 07:52 PM
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...
-
Matt Jones October 26th, 2009 @ 03:20 AM
- State changed from new to duplicate
Closing this as a duplicate of #2227.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>
People watching this ticket
Referenced by
- 3235 default scoping and associations This is a duplicate of #2227 (also #2128, #2791) - may wa...
- 2260 find_in_batches updates (+2 bugs) bug 2128 URL: http://rails.lighthouseapp.com/p...
- 2128 ActiveRecord::find_in_batches bug or feature? Evgeniy or Eric, did you ever reach a resolution here? Th...
- 2260 find_in_batches updates (+2 bugs) https://rails.lighthouseapp.com/projects/8994/tickets/21...