Skip to content

Instantly share code, notes, and snippets.

@ventsislaf
Created July 12, 2015 12:58
Show Gist options
  • Save ventsislaf/7b6637c20f7a48683789 to your computer and use it in GitHub Desktop.
Save ventsislaf/7b6637c20f7a48683789 to your computer and use it in GitHub Desktop.
Show SQL queries in Rails console

Execute this in the Rails console and then all SQL queries from ActiveRecord will be shown:

ActiveRecord::Base.logger = Logger.new(STDOUT)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment