Skip to content
This repository has been archived by the owner on Dec 12, 2021. It is now read-only.

on clicking link_to_add nested forms not shown in rails #374

Open
Hassan9229 opened this issue Jun 29, 2016 · 1 comment
Open

on clicking link_to_add nested forms not shown in rails #374

Hassan9229 opened this issue Jun 29, 2016 · 1 comment

Comments

@Hassan9229
Copy link

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.

@om-nishu-trantor
Copy link

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants