Created
November 5, 2010 23:38
-
-
Save ahoward/665041 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
# support for using named routes from the console | |
# | |
# files: lib/railsext.rb | |
# | |
module Kernel | |
private | |
def use_named_routes_in_the_console! options = {} | |
include ActionController::UrlWriter | |
options.to_options! | |
options.reverse_merge! :host => 'localhost', :port => 3000 | |
default_url_options.reverse_merge!(options) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment