Christophe Christophe
2006-Mar-23 11:00 UTC
[Rails] start_form_tag how to use the options parameter ?
Hello, I don''t understand how to use the options parameter of start_form_tag I want to have the class and id attributes of the form initialized to "Foo"... 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... -- Posted via http://www.ruby-forum.com/.
Christophe Christophe
2006-Mar-23 11:14 UTC
[Rails] Re: start_form_tag how to use the options parameter ?
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 ? So <%= start_form_tag( options = {:class => ''Foo''}) %> does not work - why ?? -- Posted via http://www.ruby-forum.com/.