在我的 Ruby on Rails Web 应用程序中,我有以下文件:
app/models/big.rb
app/controllers/big_controller.rb
app/models/small.rb
app/controllers/small_controller.rb
http://localhost:8080/big/1
和之类的链接效果http://localhost:8080/small/
很好,但我希望能够拥有一个链接,例如
http://localhost:8080/big/1/small
我如何设置路线来做到这一点?我希望不必经过并更新所有路径(例如small_path
)