Created
November 26, 2013 17:39
-
-
Save warantesbr/7662634 to your computer and use it in GitHub Desktop.
Toggle ActiveRecord log
This file contains hidden or 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 ActiveRecord log off: | |
backup_logger = ActiveRecord::Base.logger | |
ActiveRecord::Base.logger = nil | |
# Turn it back on: | |
ActiveRecord::Base.logger = backup_logger |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment