Skip to content

Instantly share code, notes, and snippets.

@loginx
Created March 10, 2011 16:36
Show Gist options
  • Save loginx/864421 to your computer and use it in GitHub Desktop.
Save loginx/864421 to your computer and use it in GitHub Desktop.
~/.irbrc config file to enable ActiveRecord logging to the rails console (if in rails console) and enable IRB autocompletion and autoindent.
require 'irb/completion'
require 'pp'
IRB.conf[:AUTO_INDENT]=true
if defined?(Rails) && !Rails.env.nil?
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