-
-
Save mori-dev/3274931 to your computer and use it in GitHub Desktop.
confirmationを使う場合にRESTfulっぽくなるようにしてみた
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resources :products, only: [:index, :show] | |
namespace :products do | |
resources :registrations, only: [:new, :create, :edit, :update] | |
resources :confirmations, only: [:show, :update] do | |
get :completion, on: :collection | |
end | |
end | |
namespace :admin do | |
resources :products do | |
resource :acceptance, only: [:create, :destroy], module: :products | |
end | |
end | |
# GET /products | |
# | |
# GET /products/registrations/new | |
# POST /products/registrations | |
# GET /products/registrations/:id/edit | |
# PUT /products/registrations/:id | |
# | |
# GET /products/confirmations/:id | |
# PUT /products/confirmations/:id | |
# GET /products/confirmations/completion | |
# | |
# POST /admin/products/:product_id/acceptance | |
# DELETE /admin/products/:product_id/acceptance |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment