launchscout / nku

NKU Class Spring
5 stars 14 forks source link

Adding comment not working anymore #11

Closed beisert1 closed 10 years ago

beisert1 commented 10 years ago

Adding comments used to work but now after I finished the tutorial everything works except for adding new comments. I triple checked the syntax and I believe it might of happened in the re-factoring section of the tutorial because I was able to add comments before that. Here is my error:

image

JesseeMeadows commented 10 years ago

Seems in the directions, the code goes from: "@comment = @post.comments.create(params[:comment].permit(:commenter, :body))" to "@comment = @post.comments.create(params[:comment])"

When adding the "destroy". Not sure why but that's your problem.

beisert1 commented 10 years ago

Thank you I changed it back to "@comment = @post.comments.create(params[:comment].permit(:commenter, :body))" and it works now!!!

Thanks again!