Created
August 9, 2010 15:51
-
-
Save jhsu/515602 to your computer and use it in GitHub Desktop.
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
# source: https://wincent.com/wiki/Showing_SQL_statements_in_the_Rails_console | |
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