Guest User

Untitled

a guest
Jan 24th, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. resources :categories, :constraints => { :id => /.+?/ }
  2.  
  3. ## equivalent to:
  4.  
  5. get '/categories(.:format)' => 'categories#index', :as => :categories
  6. post '/categories(.:format)' => 'categories#create'
  7. get '/categories/new(.:format)' => 'categories#new', :as => :new_category
  8. get '/categories/*id/edit(.:format)' => 'categories#edit', :as => :edit_category
  9. get '/categories/*id(.:format)' => 'categories#show', :as => :category
  10. put '/categories/*id(.:format)' => 'categories#update'
  11. delete '/categories/*id(.:format)' => 'categories#destroy'
Add Comment
Please, Sign In to add comment