ryanb/nested_form — Issue #105: Extra parameters
Author: lucasallan
Created: 2011-10-21 14:55:04+00:00
State: open

Hello,

My form are send a extra nested_attributes. It's send the correct attributes and another one empty.

{"new_parks"=>{"price"=>"", "period"=>"", "_destroy"=>"false"}, "0"=>{"price"=>"3", "period"=>"2 horas", "id"=>"18", "_destroy"=>"false"}}

This is my nested on form:

<% f.fields_for :parks do |p| %>
<%= p.label "Período" %>
<%= p.text_field :period %>
<%= p.label "Preço" %>
<%= p.text_field :price %>

<%= p.link_to_remove "Remover esse valor"%>
<% end %>

<%= f.link_to_add "Adicionar Valor", :parks %>