Formulaire de création


<%= @survey.title %>


<%= @survey.description %>

<%= form_tag add_path(@survey.id), action: "post" do |s| %> <% @survey.questions.each do |q| %>

<%= q.text %>


<%= q.question_type %>


<% @survey.answers.build %> <% @survey.answers.build %> <% @survey.answers.build %> <%= fields_for :answer do |a| %>
<%= a.label :text, "Votre réponse :"%>
<%= a.text_field :text %> <%= a.text_field :question_id, type:"hidden", value: q.id %>
<% end %>
<% end %>
<% end %>