From d14e2987b583a3dcb6836d310f77ce367c7396f8 Mon Sep 17 00:00:00 2001 From: Xavier Noria Date: Tue, 17 Aug 2010 02:37:28 +0200 Subject: the (public) routing DSL does not accept symbols for get|post|put|delete|match --- railties/guides/source/routing.textile | 8 ++++---- .../lib/rails/generators/rails/app/templates/config/routes.rb | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/railties/guides/source/routing.textile b/railties/guides/source/routing.textile index 457b6804b1..7e1b0c2e32 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: resources :photos do member do - get :preview + get 'preview' end end @@ -324,7 +324,7 @@ Within the block of member routes, each route name specifies the HTTP verb that resources :photos do - get :preview, :on => :member + get 'preview', :on => :member end @@ -335,7 +335,7 @@ To add a route to the collection: resources :photos do collection do - get :search + get 'search' end end @@ -346,7 +346,7 @@ Just as with member routes, you can pass +:on+ to a route: resources :photos do - get :search, :on => :collection + get 'search', :on => :collection end diff --git a/railties/lib/rails/generators/rails/app/templates/config/routes.rb b/railties/lib/rails/generators/rails/app/templates/config/routes.rb index d42cf3bfdf..3e35d81a69 100644 --- a/railties/lib/rails/generators/rails/app/templates/config/routes.rb +++ b/railties/lib/rails/generators/rails/app/templates/config/routes.rb @@ -16,12 +16,12 @@ # Sample resource route with options: # resources :products do # member do - # get :short - # post :toggle + # get 'short' + # post 'toggle' # end # # collection do - # get :sold + # get 'sold' # end # end @@ -35,7 +35,7 @@ # resources :products do # resources :comments # resources :sales do - # get :recent, :on => :collection + # get 'recent', :on => :collection # end # end -- cgit v1.2.3