Skip to content

Instantly share code, notes, and snippets.

@swarut
Created October 4, 2012 10:08
Show Gist options
  • Save swarut/3832705 to your computer and use it in GitHub Desktop.
Save swarut/3832705 to your computer and use it in GitHub Desktop.
Rails : Setting up hirb #rails #hirb
require 'hirb'
require 'pry'
ActiveSupport.on_load :active_record do
Hirb::Formatter.dynamic_config['ActiveRecord::Base']
Hirb.enable
old_print = Pry.config.print
Pry.config.print = proc do |output, value|
Hirb::View.view_or_page_output(value) || old_print.call(output, value)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment