Add id to form, rails -


i have problems add id="my-form" form:

<tr> <%= form_for([@patient, @patient.treatments.build], :id => "my_form") |f|%> <th><%= f.collection_select :category_id, category.find(:all), :id, :typ %></th> <th><%= f.text_field :content , :id => "inputbox"%></th> <th><%= f.text_field :day, :value => date.today %></th> <th><%= f.submit  :class => 'btn btn-small btn-primary searsa'%></th> <% end %> </tr> 

how that? tried:

<%= form_for, :id => "my_form"([@patient, @patient.treatments.build]) |f|%> 

please try:

<%= form_for([@patient, @patient.treatments.build], :html => { :id => "my_form" }) |f|%> 

Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

c# - must be a non-abstract type with a public parameterless constructor in redis -

ajax - PHP/JSON Login script (Twitter style) not setting sessions -