Hi. I am developing a Personal Blog using Rails. In Comment model, i have a database field called "website", which people who comment on an article may use it to add their website. Its working good. But in the "show" view of an article, the website link in the comments section is displayed as http://localhost:3000/articles/www.someuser.com and if i click it shows a Page not found error. The code i used is <% link_to ''comment.website'', ''comment.website %> Someone please solve this issue. Thanks in advance. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
If you want to link to an external address the string must be appended by protocol you are using (http:// , ftp://) i.e. <%= link_to "www.google.com", "http://www.google.com" %> On Oct 6, 6:33 pm, Rock Roll <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Hi. I am developing a Personal Blog using Rails. In Comment model, i > have a database field called "website", which people who comment on an > article may use it to add their website. Its working good. But in the > "show" view of an article, the website link in the comments section is > displayed ashttp://localhost:3000/articles/www.someuser.comand if i > click it shows a Page not found error. > > The code i used is > > <% link_to ''comment.website'', ''comment.website %> > > Someone please solve this issue. Thanks in advance. > -- > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Thank you Adams. Problem solved -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---