This project is archived and is in readonly mode.
[patch] AR::Base Reverse find_in_batches.
-
CancelProfileIsBroken
- Tag changed from active_record, batches, enhancement, patch to active_record, batches, bugmash, enhancement, patch
-
Elise Huard
i see the point of the order thing, but not of the limit - there is already a batch size ?
tested with mysql - the tests run, but i would add test with :order => :asc too. I know that's the default too, but someone's bound to specify it if the option exists (in the foolproof category).
tested the (only slightly) modified patch with
mysql
postgresql
sqlite3with ruby1.8.6
for ruby1.9.1:
activerecord/lib/active_record/attribute_methods/read.rb:15:inundef_method': undefined methodid' for classActiveRecord::Base' (NameError)<br/> probably due to something else, and it occurs with all above dbs. -
Michael Koziarski
- State changed from new to wontfix
This function is deliberately limited to primary_key order because those values don't change. If you order by title and manipulate the title in your block, you'll get nonsense / repeated options back.
It's only intended for iterating over the whole collection in primary_key order.
-
Michael Koziarski
- Tag changed from active_record, batches, bugmash, enhancement, patch to active_record, batches, enhancement, patch
