Last active
December 14, 2015 20:28
-
-
Save holamendi/5143590 to your computer and use it in GitHub Desktop.
Disable SQL log in Rails Console (3.1 +)
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
#Turn logs off | |
old_logger = ActiveRecord::Base.logger | |
ActiveRecord::Base.logger = nil | |
#Turn logs on again | |
ActiveRecord::Base.logger = old_logger |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment