Created
July 15, 2009 20:22
-
-
Save webmat/147956 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
# In .irbrc | |
# then when you want to play with generating urls from the console, | |
# just call make_urls and you're set. | |
def make_urls | |
self.class.class_eval do | |
include ActionController::UrlWriter | |
mattr_accessor :default_url_options | |
end | |
self.class.default_url_options = { | |
:host => 'localhost', | |
:protocol => 'http://', | |
:port => 3000 | |
} | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment