aboutsummaryrefslogtreecommitdiffstats
path: root/railties/guides
diff options
context:
space:
mode:
authorAndrew White <andyw@pixeltrix.co.uk>2010-08-24 07:06:53 +0100
committerAndrew White <andyw@pixeltrix.co.uk>2010-08-24 07:06:53 +0100
commit02aabbd19e59720d2d5819978d2f712c2279bf34 (patch)
tree8a194955f673922c7369eec63c1cbea5c8a37361 /railties/guides
parentcbacc9700e68d1ea3e6cc83b08226c3ddb104537 (diff)
downloadrails-02aabbd19e59720d2d5819978d2f712c2279bf34.tar.gz
rails-02aabbd19e59720d2d5819978d2f712c2279bf34.tar.bz2
rails-02aabbd19e59720d2d5819978d2f712c2279bf34.zip
Use symbols when specifying custom resource actions
Diffstat (limited to 'railties/guides')
-rw-r--r--railties/guides/source/routing.textile8
1 files changed, 4 insertions, 4 deletions
diff --git a/railties/guides/source/routing.textile b/railties/guides/source/routing.textile
index 7e1b0c2e32..457b6804b1 100644
--- a/railties/guides/source/routing.textile
+++ b/railties/guides/source/routing.textile
@@ -313,7 +313,7 @@ To add a member route, just add a +member+ block into the resource block:
<ruby>
resources :photos do
member do
- get 'preview'
+ get :preview
end
end
</ruby>
@@ -324,7 +324,7 @@ Within the block of member routes, each route name specifies the HTTP verb that
<ruby>
resources :photos do
- get 'preview', :on => :member
+ get :preview, :on => :member
end
</ruby>
@@ -335,7 +335,7 @@ To add a route to the collection:
<ruby>
resources :photos do
collection do
- get 'search'
+ get :search
end
end
</ruby>
@@ -346,7 +346,7 @@ Just as with member routes, you can pass +:on+ to a route:
<ruby>
resources :photos do
- get 'search', :on => :collection
+ get :search, :on => :collection
end
</ruby>