Skip to content

Instantly share code, notes, and snippets.

@bmax
Created February 1, 2014 21:40
Show Gist options
  • Save bmax/8759345 to your computer and use it in GitHub Desktop.
Save bmax/8759345 to your computer and use it in GitHub Desktop.
def create
33 Question.create(question_params);
34 # Question.create(:title => params[:question][:title],
35 # :summary => params[:question][:summary],
36 # :subject_id => params[:question][:subject])
37 end
38 def question_params
39 params.require(:question).permit(:title,:summary,:subject_id)
40 end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment