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

ActiveRecord find_in_batches should work without logger #11161

Merged

Conversation

dmitry
Copy link
Contributor

@dmitry dmitry commented Jun 28, 2013

When I set logger to nil both methods from Batches module find_in_batches or find_each should work anyway.

def test_logger_not_required
previous_logger = ActiveRecord::Base.logger
ActiveRecord::Base.logger = nil
Post.limit(1).find_each { |post| post }

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add some sort of assertion somewhere here?

@carlosantoniodasilva
Copy link
Member

Alright, please squash your commits :) Thanks.

@dmitry
Copy link
Contributor Author

dmitry commented Jun 28, 2013

@carlosantoniodasilva done! :)

carlosantoniodasilva added a commit that referenced this pull request Jun 28, 2013
…ogger

ActiveRecord find_in_batches should work without logger

When I set logger to nil both methods from Batches module find_in_batches or find_each should work anyway.
@carlosantoniodasilva carlosantoniodasilva merged commit 8f63515 into rails:master Jun 28, 2013
@carlosantoniodasilva
Copy link
Member

Thanks.

carlosantoniodasilva added a commit that referenced this pull request Jun 29, 2013
…ogger

ActiveRecord find_in_batches should work without logger

When I set logger to nil both methods from Batches module find_in_batches or find_each should work anyway.
rafaelfranca added a commit that referenced this pull request Sep 12, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants