Skip to content

Instantly share code, notes, and snippets.

@webmat
Created July 15, 2009 20:22
Show Gist options
  • Save webmat/147956 to your computer and use it in GitHub Desktop.
Save webmat/147956 to your computer and use it in GitHub Desktop.
# 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