How to split routes.rb into smaller files

后端 未结 3 1436
醉梦人生
醉梦人生 2020-12-17 17:39

Is it possible to split Rails 3.X routes.rb file?

We have so many resources it is difficult to find them. I would like to split at least APP and REST API routes.

3条回答
  •  猫巷女王i
    2020-12-17 18:18

    Rails 3.2.11

    config.paths["config/routes"].concat Dir[Rails.root.join("config/routes/*.rb")]

提交回复
热议问题