mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
ec5d846ac6
Sometimes it's easier to define routes inside Engine or Application class definition (e.g. one file applications). The problem with such case is that if there is a plugin that has config/routes.rb file, it will trigger routes reload on application. Since routes definition for application is not in config/routes.rb file routes_reloader will fail to reload application's routes properly. With this commit you can pass routes definition as a block to routes method, which will allow to properly reload it: class MyApp::Application < Rails::Application routes do resources :users end end |
||
---|---|---|
.. | ||
mapper.rb | ||
polymorphic_routes.rb | ||
route.rb | ||
route_set.rb | ||
routes_proxy.rb | ||
url_for.rb |