From 943410197cca4235212ca0fc409820378a40890c Mon Sep 17 00:00:00 2001 From: Oscar Del Ben Date: Sat, 28 Apr 2012 11:44:50 +0200 Subject: Add REST section to getting started guide --- guides/code/getting_started/config/routes.rb | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'guides/code/getting_started/config') diff --git a/guides/code/getting_started/config/routes.rb b/guides/code/getting_started/config/routes.rb index 6095a05a58..5fb85de766 100644 --- a/guides/code/getting_started/config/routes.rb +++ b/guides/code/getting_started/config/routes.rb @@ -1,15 +1,6 @@ Blog::Application.routes.draw do - # resources :posts do - # resources :comments - # end - get "posts" => "posts#index" - get "posts/new" - post "posts/create" - get "posts/:id" => "posts#show", :as => :post - get "posts/:id/edit" => "posts#edit" - put "posts/:id" => "posts#update" - delete "posts/:id" => "posts#destroy" + resources :posts # The priority is based upon order of creation: # first created -> highest priority. -- cgit v1.2.3 From 06a1519a4dc714822bec2312a41950aedba82541 Mon Sep 17 00:00:00 2001 From: Oscar Del Ben Date: Mon, 30 Apr 2012 09:08:32 +0200 Subject: Rewrite adding a second model section of Getting Started Guide --- guides/code/getting_started/config/routes.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'guides/code/getting_started/config') diff --git a/guides/code/getting_started/config/routes.rb b/guides/code/getting_started/config/routes.rb index 5fb85de766..04a6bd374e 100644 --- a/guides/code/getting_started/config/routes.rb +++ b/guides/code/getting_started/config/routes.rb @@ -1,6 +1,8 @@ Blog::Application.routes.draw do - resources :posts + resources :posts do + resources :comments + end # The priority is based upon order of creation: # first created -> highest priority. -- cgit v1.2.3