Created
June 12, 2011 08:12
-
-
Save aliang/1021343 to your computer and use it in GitHub Desktop.
monkeypatch Rails::Application.load_console to load app-specific .irbrc
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
# taken from http://railsbros.de/2010/11/29/a-custom-irbrc-for-rails-3.html | |
# config/application.rb that is | |
module MyApp | |
class Application < Rails::Application | |
# config stuff comes here | |
def load_console(sandbox=false) | |
super | |
if File.exists?(project_specific_irbrc = File.join(Rails.root, ".irbrc")) | |
puts "Loading project specific .irbrc ..." | |
load(project_specific_irbrc) | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment