Skip to content

Instantly share code, notes, and snippets.

@holamendi
Last active December 14, 2015 20:28
Show Gist options
  • Save holamendi/5143590 to your computer and use it in GitHub Desktop.
Save holamendi/5143590 to your computer and use it in GitHub Desktop.
Disable SQL log in Rails Console (3.1 +)
#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