[Ruby] link_to or button_to external url
Eric Hodel
drbrain at segment7.net
Thu Dec 28 12:45:44 PST 2006
On Dec 28, 2006, at 12:30, Neil Moomey 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
>
> I've read up and can't find why it's doing this. The options
> available are :anchor, :only_path, :trailing_slash, :host, and
> :protocol but none of them seem to help.
>
> I have rails 1.16 and ruby 1.8
link_to 'Google', :only_path => false, :host => 'www.google.com'
--
Eric Hodel - drbrain at segment7.net - http://blog.segment7.net
I LIT YOUR GEM ON FIRE!
More information about the Ruby
mailing list