-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds +as_relation+ flag to EnumeratorBuilder#active_record_on_batches
Currently, the resulting batch from #active_record_on_batches is an Array of records. Many job authors end up converting this into a relation to perform batch operations such as `#update_all`. By expanding the API of #active_record_on_batches to return a relation if a flag is set, users who require their batch as an ActiveRecord::Relation will no longer need to perform an additional query to turn records back into a relation.
- Loading branch information
1 parent
4e4ed66
commit 7ef5a5a
Showing
4 changed files
with
33 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters