Start_form_tag how to use the options parameter?

Hello, I don’t understand how to use the options parameter of
I want to have the class and id attributes of the form initialized to

I suppose it’s something like
start_form_tag( :options[‘class’] => ‘Foo’, :options[‘id’] => ‘Foo’)

But I can’t figure out the right syntax…

Thank you in advance…

Got it :
<%= start_form_tag( {}, {:class => ‘Foo’}) %>

But why do I need to provide an empty {} (empty list ? empty collectin ?
empty array ? what is this ?) ?

I tought that the order of the parameters was not important as long as
there have a name ?

<%= start_form_tag( options = {:class => ‘Foo’}) %>

does not work - why ??

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