Sign in through GitHub

Please read for an updated status on RailsCasts:

Learn more or hide this

monksy's Profile

GitHub User: monksy

Site: http://theexceptioncatcher.com

Comments by monksy

Avatar

With rails4 you must specify the parameters that are being saved.

CommentsContrller.rb
    @comment = @article.comments.create!(comment_params)
    redirect_to @article, :notice => "Comment Created!"
  end   
  
  private
     def comment_params
        params.require(:comment).permit(:name, :content)
     end