Skip to content

Instantly share code, notes, and snippets.

View Henryvw's full-sized avatar

Henry van Wagenberg Henryvw

View GitHub Profile
= form_for @rehearsal do |f|
.field
= f.label :tally
= f.number_field :tally
/ = render "e_answer_fields", :f => e_builder
%p
%b Questions:
- @exercise.e_questions.each do |e_question|
@Henryvw
Henryvw / rehearsals_form.html.haml
Created August 9, 2014 07:52
rough solution for how to display questions (and do an answer build for each one) on a new rehearsal
= semantic_form_for @rehearsal do |f|
= f.inputs do
= f.input :tally
%p
%b Questions:
- @rehearsal.e_questions.each do |e_question|
%tr
%td= e_question.question
%p
= f.fields_for :e_answers do |a_builder|
@Henryvw
Henryvw / rehearsals_form.html.haml
Created August 9, 2014 07:36
rough solution for how to display questions (and do an answer build for each one) on a new rehearsal
%b Questions:
- @rehearsal.e_questions.each do |e_question|
%tr
%td= e_question.question
%p
= f.fields_for :e_answers do |a_builder|
= render "e_answer_fields", :f => a_builder
= f.actions do
= f.action :submit, :as => :input