Ruby on rails 运行rails时发生错误:无法从生成post_comment_url
我在执行过程中遇到的错误是Ruby on rails 运行rails时发生错误:无法从生成post_comment_url,ruby-on-rails,Ruby On Rails,我在执行过程中遇到的错误是 post_comment_url未能从{:action=>“show”,:controller=>“comments”,:post_id=>#,:id=>#}生成,应为:{:action=>“show”,:controller=>“comments”},diff:{:post_id=>#,:id=>#在您的情况下,post_comment_url应接收两个参数:post id和comment id,如: post_comment_url(@post, @comment
post_comment_url未能从{:action=>“show”,:controller=>“comments”,:post_id=>#,:id=>#}生成,应为:{:action=>“show”,:controller=>“comments”},diff:{:post_id=>#,:id=>#在您的情况下,
post_comment_url
应接收两个参数:post id
和comment id
,如:
post_comment_url(@post, @comment)