Your form_for uses the @item? if so you are already looping through it's
item_item_properties, yo don't need to loop again inside fields_for, you
already have iip defined, that's why you have everything multiplied

El mié., 4 dic. 2019 a las 11:55, fugee ohu (<fugee...@gmail.com>) escribió:

> This snippet duplicates all the expected fields times 8
>
>            <%= f.fields_for :item_item_properties do |iip| %>
>                       <div class="item_item_property">
>                           <% @item.item_item_properties.each do
> |item_item_property| %>
>                                 <tr><td><%= iip.label
> item_item_property.item_property.name %><td><%= iip.hidden_field
> :item_property_id, value: item_item_property.item_property_id %> <%=
> iip.text_field  :text_value, value: item_item_property.text_value %>
>                          <% end %>
>                       </div>
>             <% end %>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to rubyonrails-talk+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/rubyonrails-talk/f72416d0-72cd-48b4-a6b1-13a55909d59f%40googlegroups.com
> <https://groups.google.com/d/msgid/rubyonrails-talk/f72416d0-72cd-48b4-a6b1-13a55909d59f%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/CAPS3bcA_PbX-ds_Z7i9FW%3DzaiS_1_eX7-FM7%3DDYa9h0bwOBvjw%40mail.gmail.com.

Reply via email to