I am using the form_tag_helper to create a form, but I want to give it
an ID so I can style the elements within the form. I currently have
the following:
<% form_tag :controller => 'my_controller', :action =>
'my_action' do %>
<input class="actionButton" type="submit" value="Submit" />
<% end %>
This compiles and runs ok with no errors, but it treats the ID= as a
parameter for my URL - not what I want. Is there a way to use
form_tag to generate HTML similar to this:
I am using the form_tag_helper to create a form, but I want to give it
an ID so I can style the elements within the form. I currently have
the following:
Style things with classes unless you must use IDs. I can't think of a reason.
Rails is so flexible that, before you know it, you will be cloning this form and en-partialling it into your page more than once, and IDs must be unique to their document...
I just added the extra braces back in so I could see the error again,
but now it does not complain - I must have had something extra or
something missing. So I guess it works both ways.