Last active
August 29, 2015 14:21
-
-
Save kristjan/d8a6680b07a661833045 to your computer and use it in GitHub Desktop.
ActiveRecord log silencing example
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
$ rails c | |
Loading development environment (Rails 4.1.2) | |
[1] pry(main)> Specialist.find(15) | |
Specialist Load (0.9ms) SELECT "specialists".* FROM "specialists" WHERE "specialists"."id" = $1 LIMIT 1 [["id", 15]] | |
=> #<Specialist id: 15, ...> | |
[2] pry(main)> ActiveRecord::Base.logger.silence(Logger::FATAL) { Specialist.find(16) } | |
=> #<Specialist id: 16, ...> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment