webmat (owner)

Revisions

gist: 147956 Download_button fork
public
Public Clone URL: git://gist.github.com/147956.git
Embed All Files: show embed
Ruby #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# 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