This project is archived and is in readonly mode.
find_each doesn't respect default_scope
-
Daniel Guettler
find_each is calling find_in_batches which doesn't support any order option but uses table_name.primary_key for the order statement.
From the doc:# It's not possible to set the order. That is automatically set to # ascending on the primary key ("id ASC") to make the batch ordering # work. This also mean that this method only works with integer-based # primary keys. You can't set the limit either, that's used to control # the the batch sizes. -
CancelProfileIsBroken
- State changed from new to invalid
find_each is a special method for blasting through a table in PK order, that's all. It doesn't partake of the default scope at all.