Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save jordanandree/2937896 to your computer and use it in GitHub Desktop.
Save jordanandree/2937896 to your computer and use it in GitHub Desktop.
awesome_print as default for Rails console
## Gemfile
group :development do
gem "awesome_print", :require => "ap"
end
## ~/.irbrc
require "rubygems"
require "ap"
unless IRB.version.include?('DietRB')
IRB::Irb.class_eval do
def output_value
ap @context.last_value
end
end
else # MacRuby
IRB.formatter = Class.new(IRB::Formatter) do
def inspect_object(object)
object.ai
end
end.new
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment