カテゴリ モデルがあり、routes.rb には
resources :categories
これにより、次の一連のルートが生成されます。
categories_path GET /categories(.:format) categories#index
POST /categories(.:format) categories#create
new_category_path GET /categories/new(.:format) categories#new
edit_category_path GET /categories/:id/edit(.:format) categories#edit
category_path GET /categories/:id(.:format) categories#show
PATCH /categories/:id(.:format) categories#update
PUT /categories/:id(.:format) categories#update
DELETE /categories/:id(.:format) categories#destroy
ここで必要なのは、すべての GET ルートを除いて、残りのルートを「/admin」スコープの下に置くことです。そのため、作成、編集、削除などの操作は、admin/categories/:id/edit などでアクセスできます。
このスコープに言及する簡単な方法はありますか?