When pasting ActiveRecord::Base.logger = Logger.new(STDOUT)
into the rails console, it will convert all active record queries into raw SQL.
This is helpful to make sure active record queries are optimized (avoid n+1) or quickly grab an SQL statement for database software.
A great tip to keep in your back pocket!