diff options
Diffstat (limited to 'guides/source/routing.textile')
-rw-r--r-- | guides/source/routing.textile | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/guides/source/routing.textile b/guides/source/routing.textile index 4de76ff100..cffbf9bec4 100644 --- a/guides/source/routing.textile +++ b/guides/source/routing.textile @@ -32,7 +32,13 @@ the request is dispatched to the +patients+ controller's +show+ action with <tt> h4. Generating Paths and URLs from Code -You can also generate paths and URLs. If your application contains this code: +You can also generate paths and URLs. If the route above is modified to be + +<ruby> +get "/patients/:id" => "patients#show", :as => "patient" +</ruby> + +If your application contains this code: <ruby> @patient = Patient.find(17) |