Link_to external link

I have searched through the api several times through and can’t seem to
find this.

<%= link_to ‘Help’,
{:url => ‘’},
{:target => “_new”} %>

but this doesn’t work as it still prepends the current server/controller
space on the url itself.

How do I accomplish this?




link_to ‘Help’,‘’,{:target =>

On Monday, April 24, 2006, at 8:26 AM, Craig W. wrote:

How do I accomplish this?



Rails mailing list
[email protected]


Hi Craig,

I’m not sure that you’d want to use link_to in this case. It seems like
purpose of link_to and url_for, which it’s based on, is to take
advantage of
the mappings you’ve created in routes.rb .

However, you may also want to try the following options, which I copied
the url_for documentation

:only_path - if true, returns the absolute URL (omitting the protocol,

host name, and port)

:host - overrides the default (current) host if provided

:protocol - overrides the default (current) protocol if provided

I hope this helps!

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs