From 1dd7bf4ea3490f49732fbc8296ca14090a2e71ee Mon Sep 17 00:00:00 2001 From: Oliver Jakubiec Date: Wed, 10 Apr 2013 17:40:18 -0700 Subject: Updated Singular Resource shorthand to mention shorthand without controller name. --- guides/source/routing.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/guides/source/routing.md b/guides/source/routing.md index 04098f0a5c..f4cb8fe15b 100644 --- a/guides/source/routing.md +++ b/guides/source/routing.md @@ -138,6 +138,12 @@ Sometimes, you have a resource that clients always look up without referencing a 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: + +```ruby +get 'profile', to: :show +``` + This resourceful route: ```ruby -- cgit v1.2.3