Created
January 26, 2011 10:21
-
-
Save baldowl/796516 to your computer and use it in GitHub Desktop.
.irbrc
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
require 'rubygems' | |
require 'irb/completion' | |
if ENV['RAILS_ENV'] | |
# Redirecting ActiveRecord's messages to stdout. RoR2 | |
require 'logger' | |
Object.const_set :RAILS_DEFAULT_LOGGER, Logger.new(STDOUT) | |
elsif Object.const_defined? :RAILS_ENV | |
# Redirecting ActiveRecord's messages to stdout. RoR3 | |
ActiveRecord::Base.logger = Logger.new STDOUT | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment