Skip to content

Instantly share code, notes, and snippets.

@brianjlandau
Created March 8, 2011 18:19
Show Gist options
  • Select an option

  • Save brianjlandau/860691 to your computer and use it in GitHub Desktop.

Select an option

Save brianjlandau/860691 to your computer and use it in GitHub Desktop.
if rails_env = ENV['RAILS_ENV']
require 'logger'
RAILS_DEFAULT_LOGGER = Logger.new(STDOUT)
IRB.conf[:IRB_RC] = Proc.new do
# Called after the irb session is initialized and Rails has
# been loaded (props: Mike Clark).
if defined? ActiveRecord::Base
ActiveRecord::Base.logger = RAILS_DEFAULT_LOGGER
end
if defined?(ActionController::UrlWriter)
include ActionController::UrlWriter
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment