I''ve checked the Rails documentation but find no mention of link_to ''external url'' or equivalent. Does rails have a built in method to do this? thanks -Lindsay -- Posted via http://www.ruby-forum.com/.
Lindsay Boyd wrote:> I''ve checked the Rails documentation but find no mention of link_to > ''external url'' or equivalent. Does rails have a built in method to do > this?http://lists.rubyonrails.org/pipermail/rails/2006-January/008448.html Google saves the day. -- Posted via http://www.ruby-forum.com/.
link_to "Google", "http://www.google.com" Tom On 5/2/06, Lindsay Boyd <lindsay.boyd@ntlworld.com> wrote:> I''ve checked the Rails documentation but find no mention of link_to > ''external url'' or equivalent. Does rails have a built in method to do > this? > > thanks > -Lindsay > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails
On Tuesday 02 May 2006 16:02, Lindsay Boyd wrote:> I''ve checked the Rails documentation but find no mention of link_to > ''external url'' or equivalent. Does rails have a built in method to do > this?<%= link_to "Click here to visit my site", "http://www.example.com/" -%> ~Dave -- Dave Silvester Rent-A-Monkey Website Development http://www.rentamonkey.com/ PGP Key: http://www.rentamonkey.com/pgpkey.asc
David wrote:> > Google saves the day.Cheers David. That''s good to know. When I apply this to my app I now have a new problem: my app allows users to enter URLs with or without an ''http://''. When the URLs are displayed, I want them to be linkable, so I can use link_to, but I have to check to see if ''http://'' is present. So, looks like I will have to write my own method. thanks -Lindsay -- Posted via http://www.ruby-forum.com/.
Check out auto_link: http://api.rubyonrails.org/classes/ActionView/Helpers/TextHelper.html#M000514 On 5/2/06, Lindsay Boyd <lindsay.boyd@ntlworld.com> wrote:> David wrote: > > > > Google saves the day. > > Cheers David. That''s good to know. > > When I apply this to my app I now have a new problem: my app allows > users to enter URLs with or without an ''http://''. When the URLs are > displayed, I want them to be linkable, so I can use link_to, but I have > to check to see if ''http://'' is present. So, looks like I will have to > write my own method. > > thanks > -Lindsay > > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
Just out of curiosity, why would you use the link_to helper for an external url? Charlie Bowman www.recentrambles.com On Tue, 2006-05-02 at 12:04 -0400, Wilson Bilkovich wrote:> Check out auto_link: > http://api.rubyonrails.org/classes/ActionView/Helpers/TextHelper.html#M000514 > > On 5/2/06, Lindsay Boyd <lindsay.boyd@ntlworld.com> wrote: > > David wrote: > > > > > > Google saves the day. > > > > Cheers David. That''s good to know. > > > > When I apply this to my app I now have a new problem: my app allows > > users to enter URLs with or without an ''http://''. When the URLs are > > displayed, I want them to be linkable, so I can use link_to, but I have > > to check to see if ''http://'' is present. So, looks like I will have to > > write my own method. > > > > thanks > > -Lindsay > > > > > > -- > > Posted via http://www.ruby-forum.com/. > > _______________________________________________ > > Rails mailing list > > Rails@lists.rubyonrails.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060502/9265b3f7/attachment.html