Created
April 30, 2010 07:51
-
-
Save avsej/384900 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'irb/ext/save-history' | |
IRB.conf[:SAVE_HISTORY] = 100000 | |
IRB.conf[:HISTORY_FILE] = "#{ENV['HOME']}/.irb-history" | |
require 'irb/completion' | |
require 'hirb' | |
# Hirb::View.enable | |
def change_log(stream) | |
ActiveRecord::Base.logger = Logger.new(stream) | |
ActiveRecord::Base.clear_active_connections! | |
end | |
def show_log | |
change_log(STDOUT) | |
end | |
def hide_log | |
change_log(nil) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment