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
Try
<%= form_tag({:controller => ''home'',:action =>
''login'',:protocol =>
''https://'', :only_path => false},{:method =>
''post''}) %>
Kent
---
http://www.datanoise.com
On 2/17/06, Curtis Spencer <thorin@gmail.com>
wrote:> 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
>
> _______________________________________________
> Rails mailing list
> Rails@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>
Thanks Kent. That did the trick! -Curtis Kent Sibilev wrote:> Try > > <%= form_tag({:controller => ''home'',:action => ''login'',:protocol => > ''https://'', :only_path => false},{:method => ''post''}) %> > > Kent > --- > http://www.datanoise.com > > > > On 2/17/06, Curtis Spencer <thorin@gmail.com> wrote: >> 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 >> >> _______________________________________________ >> Rails mailing list >> Rails@lists.rubyonrails.org >> http://lists.rubyonrails.org/mailman/listinfo/rails >>