nested_form
nested_form copied to clipboard
on clicking link_to_add nested forms not shown in rails
Using nested_forms in rails for association forms.
Survey model
has_many :questions
Question model
has_many :options
In survey form when I click on
<%= f.link_to_add "Add More Questions", :questions %>
Question fields open but options fields not open.It open by click on <%= question.link_to_add "Add more options", :options %>
I want when I click on add more questions , option fields also appear.
As mentioned here: https://github.com/ryanb/nested_form#usage
To be able to use this gem, you'll need to add accepts_nested_attributes_for :questions