Is there a link_to 'external url'?

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

Lindsay B. 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.

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

On Tuesday 02 May 2006 16:02, Lindsay B. 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 S.
Rent-A-Monkey Website Development

PGP Key: http://www.rentamonkey.com/pgpkey.asc

Check out auto_link:

link_to “Google”, “http://www.google.com

Tom

Just out of curiosity, why would you use the link_to helper for an
external url?

Charlie B.
www.recentrambles.com