Here's how I did it...
Run command with default ActiveRecord (AR) logger settings
>> Location.where('ancestry is null').size
(0.6ms) SELECT COUNT(*) FROM "locations" WHERE (ancestry is null)
=> 8888
>>
Disable AR output to console
Change the ActiveRecord::Base.logger.level setting
>> ActiveRecord::Base.logger.level = Logger::FATAL
=> 4
Now, when you run AR commands, you won't see the SQL commands that AR executed
ActiveRecord::Base.logger.level Options
- Logger::DEBUG
- Logger::INFO
- Logger::WARN
- Logger::ERROR
- Logger::FATAL
>> Location.where('ancestry is null').size
=> 8888
Disable AR output to console via Ruby Console Config File
Add the following to your ~/.irbrc (or ~/.pryrc file):
ActiveRecord::Base.logger = nil
Nice Articles!
ReplyDeleteGreat moments of this articles!
Im surprised! Keep posting dude!
Read More:
* Download Film Minions 3 (Subtitle Indonesia) 2015
* Download Yakuza Apocalypse Subtitle Indo (2015)
* Download Film Terminator Genisys 2015 (Subtitle Indonesia)
* Download Film Insidious: Chapter 3 2015 (Subtitle Indonesia)
* Download Inside Out 2015 (Subtitle Indonesia) HD-RAY
* Download Jurassic World 2015 (Subtitle Indonesia)
* Film Korea Romantis Populer 2015
Ecommerce is a great way to promote customised products. Visit if you're looking for the best eCommerce App development company in the US.
ReplyDelete