Forum: Ruby on Rails form_tag with protocol => 'https' help

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.
E813e0a366e5d5ddc302fa57a0fc2fab?d=identicon&s=25 Curtis Spencer (Guest)
on 2006-02-17 08:34
(Received via mailing list)
Hi,

I am not having much luck using the form_tag with a protocol.   I try
the following in my view: index.rhtml

 <%= form_tag({:controller => 'home',:action => 'login',:protocol =>
'https'},{:method => 'post'}) %>

hoping it would generate

<form action='https://myhost.com/home/login' method='post'>

but I got the following

<form action='/home/login' method='post'>

I also tried to sanity check by just doing

<%= url_for :controller => 'home',:action => 'login',:protocol =>
'https' %>, and I still just get '/home/login' as the resulting string.

Anyone see where I am going astray?

Thanks,
Curtis
3ccecc71b9fb0a3d7f00a0bef6f0a63a?d=identicon&s=25 Kent Sibilev (Guest)
on 2006-02-17 08:40
(Received via mailing list)
Try

<%= form_tag({:controller => 'home',:action => 'login',:protocol =>
'https://', :only_path => false},{:method => 'post'}) %>

Kent
---
http://www.datanoise.com
E813e0a366e5d5ddc302fa57a0fc2fab?d=identicon&s=25 Curtis Spencer (Guest)
on 2006-02-17 09:28
(Received via mailing list)
Thanks Kent.  That did the trick!

-Curtis
This topic is locked and can not be replied to.