How to Showing SQL statements in the Rails console

Saturday, April 24, 2010

Showing SQL statements in the Rails console and using hirb
vim ~/.irbrc

require 'rubygems'
require 'hirb'
Hirb::View.enable
if ENV.include?('RAILS_ENV')
  require 'logger'
  RAILS_DEFAULT_LOGGER = Logger.new(STDOUT)
end

This entry was tagged Rails

comments powered by Disqus

© 2009-2013 lxneng.com. All rights reserved. Powered by Pyramid

go to Top