Today I Learned Notes to self about software development

    TIL about helpful flags built-in to the rails routes task.

    -g

    allows you to grep the output and filter for any routes that partially match the URL helper method name, the HTTP verb, or the URL path.


    Example: rails routes -g new_comment</br> rails routes -g POST</br> rails routes -g admin
    -c

    allows you to filter output by controller name.


    Example: rails routes -c users</br> rails routes -c admin/users</br> rails routes -c Posts</br> rails routes -c Devise::Sessions
    --expanded

    makes the output easier to view in smaller terminals.


    Example: rails routes --expanded</br>
    --unused

    lists routes that are "unused" in your application. An "unused" route in Rails is a route that is defined in the config/routes.rb file but is not referenced by any controller action or view in your application


    Example: rails routes --unused

    Rails guide source