Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return rows affected from batched update_all and delete_all #40293

Merged
merged 1 commit into from Oct 3, 2020

Conversation

eugeneius
Copy link
Member

Fixes #40287.

The previous return value of nil was undocumented and inconsistent with the non-batched versions of these methods.

Also lean on each to create the batches, and add API documentation for update_all, delete_all, and destroy_all on BatchEnumerator.

@p8
Copy link
Member

p8 commented Sep 29, 2020

Great refactoring!

The previous return value of nil was undocumented and inconsistent with
the non-batched versions of these methods.

Also lean on `each` to create the batches, and add API documentation for
`update_all`, `delete_all`, and `destroy_all` on `BatchEnumerator`.
@eugeneius eugeneius merged commit d46668a into rails:master Oct 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The update_all method doesn't return the number of rows affected when combining the relation with in_batches.
2 participants