Forum: Ruby on Rails Having Trouble With :protocol and :host with link_to

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
A7db9ec803b5895ae5f916a74e2db329?d=identicon&s=25 lists (Guest)
on 2005-11-12 21:40
(Received via mailing list)
Hello,

I am trying to set the protocol and host in link_to based on the
documentation.

I have the following:

<%= link_to "View Cart", {:controller => 'store', :action =>
'view_cart',
:protocol => 'https://', :host => 'secure.host.com'} %>

I would expect this to generate a https link to another host.

Instead, all I get is:

<a href="/store/view_cart">View Cart</a>

Have I misunderstood the url_for specs?

Thanks,
Hunter
This topic is locked and can not be replied to.