Skip to content

Instantly share code, notes, and snippets.

@acidtib
Created November 16, 2012 21:36
Show Gist options
  • Select an option

  • Save acidtib/4091126 to your computer and use it in GitHub Desktop.

Select an option

Save acidtib/4091126 to your computer and use it in GitHub Desktop.
def new
@questionaire = Questionaire.new
1.times do
question = @questionaire.questions.build
1.times { question.answers.build }
end
respond_to do |format|
format.html # new.html.erb
format.json { render json: @questionaire }
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment