Skip to content

Instantly share code, notes, and snippets.

@bernardeli
Created March 22, 2012 01:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bernardeli/2155001 to your computer and use it in GitHub Desktop.
Save bernardeli/2155001 to your computer and use it in GitHub Desktop.
include url_helpers
class Foo
def do_something
...
Rails.application.routes.url_helpers.my_awesome_routing_path
Rails.application.routes.url_helpers.my_awesome_routing_url(:host => 'http://your-domain.com')
...
end
end
class Foo
include Rails.application.routes.url_helpers
def do_something
...
my_awesome_routing_path
my_awesome_routing_url(:host => 'http://your-domain.com')
...
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment