Specifying class for form_remote_tag

I have a form_tag that is:
<% form_remote_tag :url => ‘/tasks/new’, :class => ‘edit_task’ do -%>

Everything is fine EXCEPT the class doesn’t get assigned to the form
tag. Any help would be appreciated…

Thanks,

Alan

Thanks! I had seen that in the docs, but I didn’t know that html
meant that you could send html options to it. Just a newbie mistake.
I seem to be making all of them. :slight_smile:

Thanks again for your help. (btw, this doesn’t work for form_tag for
anyone else looking for this one.)

–Alan

On Sun, Apr 20, 2008 at 4:00 PM, Frederick C.

On Apr 20, 9:02 pm, “Alan S.” [email protected] wrote:

I have a form_tag that is:
<% form_remote_tag :url => ‘/tasks/new’, :class => ‘edit_task’ do -%>

Everything is fine EXCEPT the class doesn’t get assigned to the form
tag. Any help would be appreciated…

Take a look at the docs: any html options need to be passed as :html
=> { …}

Fred

On 21 Apr 2008, at 15:06, Alan S. wrote:

Thanks! I had seen that in the docs, but I didn’t know that html
meant that you could send html options to it. Just a newbie mistake.
I seem to be making all of them. :slight_smile:

Thanks again for your help. (btw, this doesn’t work for form_tag for
anyone else looking for this one.)

form_tag is unfortunately different. You need
form_tag( {:action => …, :controller => …}, :class => 'foo)
It would be nice if this was consistent across the various helpers,
but unfortunately it isn’t

Fred.