On Mon, Apr 12, 2010 at 9:24 AM, ES <[email protected]> wrote:
> Each time the "add" button in my nested form is clicked, it adds the
> partial to the end of the page, not inside in the table.
> <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>
>
> My partial:
>
> <div class = "fields">
>
> <tr><td><%= f.label(:treatmenttype, "type de traitement") %></td>
A DIV can't be a child of TBODY; lose those tags and it'll probably
work.
--
Hassan Schroeder ------------------------ [email protected]
twitter: @hassan
--
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.