One of the most used Rails method for routes is resources. Another similar one also exists, but that may not be known that much. It is resource and there is actually a difference between them.
resource is supposed to be used when you do not get a resource by an ID in the URL, but by other means. For example, you may have a project in which a session has only one workshop. In this case, you may not need to reference this session’s workshop by adding the ID in the URL. You simply show the profile of the current user that is logged in. So, a possible URL could be
/workshop
rather than
/workshops/:id
You can also see that they also differ from actions and routes that they have:
You can see that resource does not have an index method, as it is supposed to be only for a single resource, as its name suggests, and not have an action for displaying a list of resources.