With PR #34480 <https://github.com/rails/rails/pull/34480>, Tekin Suleyman added implicit_column_order for use with ordered finder methods. This support did not extend to ActiveRecord::Batches <https://github.com/rails/rails/blob/master/activerecord/lib/active_record/relation/batches.rb> which enforces ordering on primary_key <https://github.com/rails/rails/blob/a8dfec903bd8cd3b7df9f9d5fbb7100520049302/activerecord/lib/active_record/relation/batches.rb#L275-L277>. The same logic/reasoning introduced for implicit_column_order or defining an ordering column can be extended to ordering on ActiveRecord::Batches finder methods.
Branch with my proposed changes and tests https://github.com/rails/rails/compare/master...bullfight:imlicit_order_find_in_batches -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-core+unsubscr...@googlegroups.com. To post to this group, send email to rubyonrails-core@googlegroups.com. Visit this group at https://groups.google.com/group/rubyonrails-core. To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-core/0a2fb9dc-9975-4f32-8b0e-d8c865970908%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.