Clicking the "add" button in my nested form is adding the content outside of the page's main table, how can I get it to add the html into the table that the link is contained in?
I followed the Railscast http://railscasts.com/episodes/197-nested-model-form-part-2 My view file: <table style="width:100%" > <tbody class="fields"> <% echantillon_form.fields_for :treatments do |builder| %> <%= render :partial => "treatment_fields", :locals => {:f => builder} %> <% end %> <%= link_to_add_fields "Add treatment", echantillon_form, :treatments %> <%= echantillon_form.submit "Submit" %> <% end %> </tbody> </table> and my partial: <div class = "fields"> <tr><td><%= f.label(:treatmenttype, "type de traitement") %></td> <td><%= f.text_field :treatmenttype %></td></tr> <tr><td><%= f.label(:treatmenttype, "commentaires sur la preparation") %></td> <td><%= f.text_field :preparation %></td></tr> <tr><td><%= f.hidden_field :_destroy %> </td></tr> <tr><td><%= link_to_remove_fields "remove", f %></td></tr> </div> -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

