diff config/routes.rb @ 208:953d284ec195

Revamp the routing
author Edho Arief <edho@myconan.net>
date Sat, 11 May 2013 22:39:06 +0900
parents b4b7a29b70f6
children 9fe8c29c27c4
line wrap: on
line diff
--- a/config/routes.rb	Sat May 11 22:37:31 2013 +0900
+++ b/config/routes.rb	Sat May 11 22:39:06 2013 +0900
@@ -1,5 +1,5 @@
 Zeropaste::Application.routes.draw do
-  resources :pastes, :only => [:show, :create, :destroy], :path => '/'
-  post 'pastes' => 'pastes#create', :format => /(json|xml|txt)/
-  root :to => 'pastes#new'
+  post '(pastes)' => 'pastes#create', format: /(html|json|xml|txt)/, as: 'pastes'
+  resources :pastes, only: [:show, :destroy], path: "/"
+  root to: 'pastes#new'
 end