Please note an error on this page: http://guides.rubyonrails.org/v3.2.14/engines.html
There is this piece of wrong code, that won't work... :)
How you can modify it:
@post = Post.find(params[:post_id])
@comment = @post.comments.create(params[:comment])
flash[:notice] = "Comment was just created!"
Thanks, this has been fixed on 4.0+ guides to use comments.create. Please feel free to send a PR with improvements if you still think there's some issue there.