Skip to content
  • Gannon McGibbon's avatar
    5613b124
    Add `routes --unused` option to detect extraneous routes. · 5613b124
    Gannon McGibbon authored
    Routes take a long time to draw. Over time, a Rails app can become slow
    to boot simply because of how many routes it has. This script can be
    used to detect routes that are drawn, but aren't actually valid.
    Removing routes this script detects can help speed up your app and
    remove dead code.
    
    Example:
    
    ```
    > bin/rails routes --unused
    
    Found 2 unused routes:
    
    Prefix Verb URI Pattern    Controller#Action
       one GET  /one(.:format) action#one
       two GET  /two(.:format) action#two
    ```
    5613b124
    Add `routes --unused` option to detect extraneous routes.
    Gannon McGibbon authored
    Routes take a long time to draw. Over time, a Rails app can become slow
    to boot simply because of how many routes it has. This script can be
    used to detect routes that are drawn, but aren't actually valid.
    Removing routes this script detects can help speed up your app and
    remove dead code.
    
    Example:
    
    ```
    > bin/rails routes --unused
    
    Found 2 unused routes:
    
    Prefix Verb URI Pattern    Controller#Action
       one GET  /one(.:format) action#one
       two GET  /two(.:format) action#two
    ```
Loading