From be960635fb59b0af401a7152a7c9643cbe444567 Mon Sep 17 00:00:00 2001 From: Adam Mueller Date: Wed, 27 Nov 2024 15:11:58 -0800 Subject: [PATCH] Fix model class for new PromotionCodesController Unfortunately, our resource controller is hardcoded to look for a `Spree::` object, which obviously doesn't work with the new promotion namespace. Co-authored-by: Alistair Norman (cherry picked from commit 6ea8b43348e999ca740692c88695536c740aa0c8) --- .../solidus_promotions/admin/promotion_codes_controller.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/promotions/lib/controllers/backend/solidus_promotions/admin/promotion_codes_controller.rb b/promotions/lib/controllers/backend/solidus_promotions/admin/promotion_codes_controller.rb index ee23a457469..0310fc54ceb 100644 --- a/promotions/lib/controllers/backend/solidus_promotions/admin/promotion_codes_controller.rb +++ b/promotions/lib/controllers/backend/solidus_promotions/admin/promotion_codes_controller.rb @@ -48,6 +48,10 @@ def create private + def model_class + SolidusPromotions::PromotionCode + end + def load_promotion @promotion = SolidusPromotions::Promotion .accessible_by(current_ability, :show)