diff options
Diffstat (limited to 'lib')
-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. |