I'm reviewing the "Rails Routing From The Outside In" section of the Rails Guides, and I came across this section:
Sometimes, you have a resource that clients always look up without referencing an ID. For example, you would like /profile to always show the profile of the currently logged in user. In this case, you can use a singular resource to map /profile (rather than /profile/:id) to the show action:
get 'profile', to: 'users#show'
Passing a String to match will expect a controller#action format, while passing a Symbol will map directly to an action:
get 'profile', to: :show
The guide says that 'passing a Symbol will map directly to an action', but let's say I have multiple controllers which each have a 'show' action. How does Rails know which one to use, since I'm no longer referencing a specific controller?