Introduction
Routes tell your Rails app how to respond to different web addresses. They connect URLs to the right code that shows pages or handles actions.
When you want to show a list of items on a webpage.
When you need to handle a form submission from a user.
When you want to create a link that shows details about a single item.
When you want to organize your app's URLs in a clear way.
When you want to add a new page or feature to your website.