How can I get a full url in rails?
url_for @book is returning only a path like /book/1 and not http://www.domain.com/book/1
Thanks (and sorry if the answer is obvious. Im learning rails!)
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Use the :host option. For example, you can use:
Note: with Rails 3 and above, use
polymorphic_urlinstead ofurl_for.