RailsCasts Pro episodes are now free!

Learn more or hide this

Donny Kurnia's Profile

GitHub User: donnykurnia

Site: http://daily.abifathir.com/

Comments by Donny Kurnia

Avatar

For rails 3, see the most voted answers here:
http://stackoverflow.com/questions/341143/can-rails-routing-helpers-i-e-mymodel-pathmodel-be-used-in-models

Rails.application.routes.url_helpers.posts_url(:host => "example.com")