我在我的 routes.rb 文件中执行以下操作:
match '/projects/:project_id/research/worksheet/:action' => 'worksheets/research'
然而,这条路线不匹配的是 /projects/whatever/research/worksheet => worksheets/research#index。我被迫添加另一行:
match '/projects/:project_id/research/worksheet' => 'worksheets/research#index'
有没有更好的方法来实现这一点?