Skip to content

Instantly share code, notes, and snippets.

@potatosalad
Created August 17, 2011 21:22
Show Gist options
  • Save potatosalad/1152671 to your computer and use it in GitHub Desktop.
Save potatosalad/1152671 to your computer and use it in GitHub Desktop.
resources :categories
## equivalent to:
get '/categories(.:format)' => 'categories#index', :as => :categories
post '/categories(.:format)' => 'categories#create'
get '/categories/new(.:format)' => 'categories#new', :as => :new_category
get '/categories/:id/edit(.:format)' => 'categories#edit', :as => :edit_category
get '/categories/:id(.:format)' => 'categories#show', :as => :category
put '/categories/:id(.:format)' => 'categories#update'
delete '/categories/:id(.:format)' => 'categories#destroy'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment