I'm using pry, and ActiveRecord queries from the console always print out their corresponding SQL statements. I don't want this behavior. Googling around I only see that this must be explicitly achieved by setting the ActiveRecord logger to standard out.
Is this the default behavior of pry or is it the result of something I set that I forgot about? And how can I stop it?
Try looking for a .irbrc file in the project root or your home directory. You may see this or similar:
ActiveRecord::Base.logger = Logger.new(STDOUT)
Sometimes this ends up in another script that gets included in .irbrc.
YMMV, but I really like having SQL logged to the console. To each his own...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With