Mercurial > zeropaste
changeset 208:953d284ec195
Revamp the routing
author | Edho Arief <edho@myconan.net> |
---|---|
date | Sat, 11 May 2013 22:39:06 +0900 |
parents | ee7829c7c2a2 |
children | e26119fe21de |
files | config/routes.rb |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
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