how to reload routes /config/routes/* in rails 4?

后端 未结 3 1833
轻奢々
轻奢々 2021-02-08 04:50

How to force rails 4 to reload all route files?
That is without having to restart the application to make the routes from /config/routes/.rb get loaded*

3条回答
  •  旧巷少年郎
    2021-02-08 05:09

    You can use:

    Rails.application.reload_routes!
    

    You can read about it here (will have to use find)

提交回复
热议问题