Created
December 20, 2011 05:27
-
-
Save bvsatyaram/1500394 to your computer and use it in GitHub Desktop.
Showing SQL statements in the Rails console
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ENV['RAILS_ENV'] | |
# Called after the irb session is initialized and Rails has been loaded | |
IRB.conf[:IRB_RC] = Proc.new do | |
logger = Logger.new(STDOUT) | |
ActiveRecord::Base.logger = logger | |
ActiveResource::Base.logger = logger | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment