diff options
author | Alessandro Desantis <desa.alessandro@gmail.com> | 2020-06-13 18:13:36 +0200 |
---|---|---|
committer | Alessandro Desantis <desa.alessandro@gmail.com> | 2020-06-13 18:13:36 +0200 |
commit | ac97de15b4afc29498e94fa05ae3eced1899eed6 (patch) | |
tree | 4570e1c77836b6b5f1fb015c46dfbcec08c8554b /lib/solidus_subscriptions | |
parent | 94f3b5c502ae72e8000b79f38fae1912a018ae81 (diff) |
Update decorator namespaces to be compliant with Zeitwerk
Diffstat (limited to 'lib/solidus_subscriptions')
-rw-r--r-- | lib/solidus_subscriptions/engine.rb | 6 | ||||
-rw-r--r-- | lib/solidus_subscriptions/permitted_attributes.rb | 4 | ||||
-rw-r--r-- | lib/solidus_subscriptions/processor.rb | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/lib/solidus_subscriptions/engine.rb b/lib/solidus_subscriptions/engine.rb index 7b9f336..39cb754 100644 --- a/lib/solidus_subscriptions/engine.rb +++ b/lib/solidus_subscriptions/engine.rb @@ -33,8 +33,8 @@ module SolidusSubscriptions end initializer 'subscriptions_backend' do - next unless Spree::Backend::Config.respond_to?(:menu_items) - Spree::Backend::Config.configure do |config| + next unless ::Spree::Backend::Config.respond_to?(:menu_items) + ::Spree::Backend::Config.configure do |config| config.menu_items << config.class::MenuItem.new( [:subscriptions], 'repeat', @@ -45,7 +45,7 @@ module SolidusSubscriptions end def self.activate - Spree::Ability.register_ability(SolidusSubscriptions::Ability) + ::Spree::Ability.register_ability(SolidusSubscriptions::Ability) end config.to_prepare(&method(:activate).to_proc) diff --git a/lib/solidus_subscriptions/permitted_attributes.rb b/lib/solidus_subscriptions/permitted_attributes.rb index 2f50414..c93b10b 100644 --- a/lib/solidus_subscriptions/permitted_attributes.rb +++ b/lib/solidus_subscriptions/permitted_attributes.rb @@ -5,13 +5,13 @@ module SolidusSubscriptions module PermittedAttributes class << self def update_spree_permiteed_attributes - Spree::PermittedAttributes.line_item_attributes << { + ::Spree::PermittedAttributes.line_item_attributes << { subscription_line_items_attributes: nested( subscription_line_item_attributes ) } - Spree::PermittedAttributes.user_attributes << { + ::Spree::PermittedAttributes.user_attributes << { subscriptions_attributes: nested(subscription_attributes) } end diff --git a/lib/solidus_subscriptions/processor.rb b/lib/solidus_subscriptions/processor.rb index 0e38708..ef3ec59 100644 --- a/lib/solidus_subscriptions/processor.rb +++ b/lib/solidus_subscriptions/processor.rb @@ -22,7 +22,7 @@ module SolidusSubscriptions subscriptions = SolidusSubscriptions::Subscription.arel_table installments = SolidusSubscriptions::Installment.arel_table - Spree::User. + ::Spree::User. joins(:subscriptions). joins( subscriptions. |