rails/rails — pull request #9575 by spohlenz (2013-03-05 23:00:29+00:00)
Title: Allow builtin routes to be disabled even in development mode

This commits adds a `disable_builtin_routes` configuration option to the Rails Application class, allowing the builtin routes (most importantly the default `/` route) to be disabled even in development mode.

#### Why is this needed?

My CMS uses a dispatcher implemented as a middleware which dynamically routes CMS pages from the database. To ensure that content-managed pages cannot shadow routes defined by the developer, the dispatcher runs after the Rails application routes (checking for the `X-Cascade=pass` header).

With the Rails welcome page now implemented as a controller action, the route for `/` is always accessible in development mode, so the dispatcher cannot dispatch requests for `/`, meaning a CMS-managed home page cannot be viewed.