From 57a0e3d10363323269700d58c18359939f745759 Mon Sep 17 00:00:00 2001 From: luca-landa Date: Fri, 19 Mar 2021 18:31:51 +0100 Subject: Set promotion rules model paths similar to Solidus This allows for naming the models in a way more consistent to Solidus (which doesn't include "PromotionRule" in the name of the class). Also, it easily allows for the promotion rules to be displayed with a better name in the admin panel (which just uses the promotions model name humanized). --- lib/solidus_subscriptions/engine.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/solidus_subscriptions') diff --git a/lib/solidus_subscriptions/engine.rb b/lib/solidus_subscriptions/engine.rb index 4c3661a..0f274d8 100644 --- a/lib/solidus_subscriptions/engine.rb +++ b/lib/solidus_subscriptions/engine.rb @@ -31,8 +31,8 @@ module SolidusSubscriptions end initializer 'solidus_subscriptions.register_promotion_rules', after: 'spree.promo.register.promotion.rules' do |app| - app.config.spree.promotions.rules << 'SolidusSubscriptions::SubscriptionCreationOrderPromotionRule' - app.config.spree.promotions.rules << 'SolidusSubscriptions::SubscriptionInstallmentOrderPromotionRule' + app.config.spree.promotions.rules << 'SolidusSubscriptions::Promotion::Rules::SubscriptionCreationOrder' + app.config.spree.promotions.rules << 'SolidusSubscriptions::Promotion::Rules::SubscriptionInstallmentOrder' end initializer 'solidus_subscriptions.configure_backend' do -- cgit v1.2.3