[Ruby] link_to or button_to external url
Laurel Fan
laurel.fan at gmail.com
Thu Dec 28 12:43:15 PST 2006
On 12/28/06, Neil Moomey <neil at motznik.com> wrote:
> I can't seem to designate an external url with link_to or button_to
>
> <%= link_to :Google, :action => "http://www.google" %>
> give me:
> http://localhost:3004/pfd_applicants/http%3A%2F%2Fwww.google
When linking to an external url, just pass it a string instead of the
url_for options hash, eg:
<%= link_to 'Google', 'http:/www.google.com' %>
--
Laurel Fan
http://blog.gorgorg.org
More information about the Ruby
mailing list