Answer the question
In order to leave comments, you need to log in
How to properly implement nested forms?
I'll try to explain.
I have a list of products that looks like this:
- @shop.items.each do |item|
= item.name
= form_for [@shop, @item] do |f|
= f.label :name
= f.text_field :name
- @shop.items.each do |item|
= item.name
= form_for [@shop, @item] do |f|
= f.label :name
= f.text_field :name
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question