Skip to content

Instantly share code, notes, and snippets.

@jredville
Created April 27, 2012 06:00
Show Gist options
  • Save jredville/2506306 to your computer and use it in GitHub Desktop.
Save jredville/2506306 to your computer and use it in GitHub Desktop.
Use Rails url helpers from within console
#hat tip: http://stuartsierra.com/2008/01/08/testing-named-routes-in-the-rails-console
include ActionController::UrlWriter
default_url_options[:host] = 'whatever'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment