RailsCasts Pro episodes are now free!
Learn more or hide this
GitHub User: brunzino
Site: www.nbruns.us
Also in Rails 4, remember to add the _destroy method to permitted params. Like this:
def survey_params params.require(:survey).permit(:name, questions_attributes: [:id, :content, :_destroy]) end
you also need to add it in the QuestionsController
def question_params params.require(:question).permit(:content, :_destroy]) end
Also in Rails 4, remember to add the _destroy method to permitted params. Like this:
you also need to add it in the QuestionsController