我是Rails的新手.
我创建了一个Web应用程序,我可以通过/posts/123/comments/或访问/posts/123/comments/new,但我不知道如何在索引视图中使用link_to来显示具体的注释,当我尝试链接它时,出现"无路由"或"未定义的符号" .
我在模型和定义的文章和评论之间的嵌套关系have_many routes.rb和 post_comments GET /posts/:post_id/sensors(.:format) comments#index当我执行耙路线出现.
我怎么能这样做?