Raidspec
Raidspec

Reputation: 682

How to create or edit existing _form.html.rb partial from browser

I'm trying to create a survey app where the user can create surveys to ask others.

Scenario is basicaly like this and it's all done on the browser:

  1. User creates new form with as many questions and answer choices as they choose.
  2. Other users can view this form and fill it out, and the answers will be sent to the orignal creator of the form.

Upvotes: 0

Views: 17

Answers (1)

Rajdeep Singh
Rajdeep Singh

Reputation: 17834

You need dynamic forms to achieve this, there's an awesome gem called nested_form to easily created nested forms. The creator of this gem Ryan Bates has also created a Railscast session to demonstrate its usage and fortunately in that video the demo app is on survey. Here's the link to the video

https://www.youtube.com/watch?v=amT27SfNhKM

Here's the link to the gem

https://github.com/ryanb/nested_form

Hope that helps!

Upvotes: 1

Related Questions