Skip to content

Instantly share code, notes, and snippets.

@chrisgaunt
Created June 30, 2011 23:55
Show Gist options
  • Save chrisgaunt/1057578 to your computer and use it in GitHub Desktop.
Save chrisgaunt/1057578 to your computer and use it in GitHub Desktop.
Output SQL in the rails console (Rails 3.0.9)
if "script/rails" == $0
ActiveRecord::Base.logger = Logger.new(STDOUT)
end
@chrisgaunt
Copy link
Author

This should go in environment.rb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment