diff --git a/app/controllers/solidus_friendly_promotions/admin/promotions_controller.rb b/app/controllers/solidus_friendly_promotions/admin/promotions_controller.rb index ef5bb8bb..65957c9c 100644 --- a/app/controllers/solidus_friendly_promotions/admin/promotions_controller.rb +++ b/app/controllers/solidus_friendly_promotions/admin/promotions_controller.rb @@ -59,6 +59,10 @@ def load_data def location_after_save solidus_friendly_promotions.edit_admin_promotion_url(@promotion) end + + def routes_proxy + solidus_friendly_promotions + end end end end diff --git a/config/routes.rb b/config/routes.rb index 911a8da7..74792e80 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -2,14 +2,16 @@ SolidusFriendlyPromotions::Engine.routes.draw do namespace :admin do - resources :promotion_categories, except: [:show] + scope :friendly do + resources :promotion_categories, except: [:show] - resources :promotions do - resources :promotion_rules - resources :promotion_actions - resources :promotion_codes, only: [:index, :new, :create] - resources :promotion_code_batches, only: [:index, :new, :create] do - get "/download", to: "promotion_code_batches#download", defaults: {format: "csv"} + resources :promotions do + resources :promotion_rules + resources :promotion_actions + resources :promotion_codes, only: [:index, :new, :create] + resources :promotion_code_batches, only: [:index, :new, :create] do + get "/download", to: "promotion_code_batches#download", defaults: {format: "csv"} + end end end end