diff options
Diffstat (limited to 'lib/solidus_subscriptions/engine.rb')
-rw-r--r-- | lib/solidus_subscriptions/engine.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/solidus_subscriptions/engine.rb b/lib/solidus_subscriptions/engine.rb index 50b1dc1..78f0d47 100644 --- a/lib/solidus_subscriptions/engine.rb +++ b/lib/solidus_subscriptions/engine.rb @@ -15,6 +15,10 @@ module SolidusSubscriptions require 'solidus_subscriptions/config' end + initializer 'register_subscription_promotion_rule', after: 'spree.promo.register.promotion.rules' do |app| + app.config.spree.promotions.rules << 'SolidusSubscriptions::SubscriptionPromotionRule' + end + def self.activate Dir.glob(File.join(File.dirname(__FILE__), '../../app/decorators/**/*.rb')) do |c| Rails.configuration.cache_classes ? require(c) : load(c) |