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

Popular posts from this blog

yii2 - Yii 2 Running a Cron in the basic template -

asp.net - 'System.Web.HttpContext' does not contain a definition for 'GetOwinContext' Mystery -

mercurial graft feature, can it copy? -