Mittenchops
Mittenchops

Reputation: 19694

Deeply nested form containing a nested form

I saw the railscast on using deeply nested forms to make a survey:
http://railscasts.com/episodes/196-nested-model-form-revised?view=asciicast

How would you construct something similar in Rails to actually /take/ the survey, instead of just construct it for display in text? How would you make a deeply nested form containing a survey form the user fills out?

Upvotes: 1

Views: 133

Answers (1)

YaBoyQuy
YaBoyQuy

Reputation: 793

Couple things to consider: Use fields_for (this is to construct child form). Use nested_form to keep building child forms (n amount) - https://github.com/ryanb/nested_form

Upvotes: 2

Related Questions