Skip to content

Instantly share code, notes, and snippets.

@manuelmorales
Created August 22, 2011 11:31
Show Gist options
  • Save manuelmorales/1162183 to your computer and use it in GitHub Desktop.
Save manuelmorales/1162183 to your computer and use it in GitHub Desktop.
How to call url_for from a model or somewhere else
# Let's break MVC!
include ActionController::UrlWriter
self.class.default_url_options = {:host => "localhost"}
home_url
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment