prix-fixe

Expand History Expand History
Collapse History Collapse History

Replace root with Redirect to /notes

The previous route declaration configures our application to handle requests to / with the notes#index controller action.

This behaved as specified by our system tests that exercise the application by visiting / directly.

Our application declares a notes#index view template, which our NotesController#index implicitly renders.

This approach adheres to conventional Rails patterns. However, without a corresponding :index declaration in our resources :notes‘s only: key, our application won’t generate a notes_path routing helper.

Our application redirects responses to the / path instead of what could be the /notes path.

This commit reconfigures the root route declaration to redirect / requests to /notes, and adds :index to the list of supported NotesController actions.