Skip to content

Instantly share code, notes, and snippets.

@jeffrydegrande
Created August 19, 2010 15:06
Show Gist options
  • Save jeffrydegrande/538090 to your computer and use it in GitHub Desktop.
Save jeffrydegrande/538090 to your computer and use it in GitHub Desktop.
args = Rails.application.routes.routes.first.defaults.dup.merge({:host => 'localhost'})
Rails.application.routes.url_for(args)
=> "http://localhost/users/sign_in"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment