# Render SQL in Rails Console if "irb" == $0 require 'logger' if ENV.include?('RAILS_ENV')&& !Object.const_defined?('RAILS_DEFAULT_LOGGER') Object.const_set('RAILS_DEFAULT_LOGGER', Logger.new(STDOUT)) else ActiveRecord::Base.logger = Logger.new(STDOUT) end end