How can I get a full url in rails?
url_for @book is returning only a path like /book/1 and not www.domain.com/book/1
Thanks (and sorry if the answer is obvio
Use the :host option. For example, you can use:
url_for(@book, :host => "domain.com")
Note: with Rails 3 and above, use polymorphic_url instead of url_for.
polymorphic_url
url_for