![Main image Main image](http://www.appletownprince.com/wp-content/themes/fresh-editorial/images/mainimage.jpg)
25th August
2010
When you’re debugging/analyzing MySQL queries in the Rails console, it helps to turn on ActiveRecord logging:
#Enable ActiveRecord logging def loud_logger(enable = true) logger = (enable == true ? Logger.new(STDOUT) : nil) ActiveRecord::Base.logger = logger ActiveRecord::Base.clear_active_connections! end