app/controllers/todos_controller.rb
# Never trust parameters from the scary internet, only allow the white list through.
Never trust parameters from the scary internet, only allow the white list through.
Never trust parameters from the scary internet only allow the white list through .
def todo_params
      task = params.require(:task);
      complete = params[:completed] || false;
      return { task: task, completed: complete };
    end
def todo_params task = params . require ( :task ) ; complete = params [ :completed ] || false ; return { task : task , completed : complete } ; end
Never trust parameters from the scary internet, only allow the white list through.
Never trust parameters from the scary internet only allow the white list through .
# params.require(:todo).permit(:task, :completed)