rails 4.0.0 destroy nested attributes throws error -
i have 2 models question , answer. question has many answers. creating , updating of nested attributes working. when nested attribute set remove setting '_destroy' '1' or 'true'. app throws error.
in controller params permitted
params.require(:question).permit(:name, :answers_attributes => [:id, :name, :_destroy ])
error
undefined method 'name' on nil class
Comments
Post a Comment