diff options
Diffstat (limited to 'app/models/solidus_subscriptions/line_item.rb')
-rw-r--r-- | app/models/solidus_subscriptions/line_item.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/models/solidus_subscriptions/line_item.rb b/app/models/solidus_subscriptions/line_item.rb index e5f8a2d..d5e8738 100644 --- a/app/models/solidus_subscriptions/line_item.rb +++ b/app/models/solidus_subscriptions/line_item.rb @@ -20,11 +20,11 @@ module SolidusSubscriptions belongs_to( :spree_line_item, - class_name: 'Spree::LineItem', + class_name: '::Spree::LineItem', inverse_of: :subscription_line_items, optional: true, ) - has_one :order, through: :spree_line_item, class_name: 'Spree::Order' + has_one :order, through: :spree_line_item, class_name: '::Spree::Order' belongs_to( :subscription, class_name: 'SolidusSubscriptions::Subscription', @@ -68,7 +68,7 @@ module SolidusSubscriptions # subscription orders. It is a frozen duplicate of the current order and # cannot be saved def dummy_order - order = spree_line_item ? spree_line_item.order.dup : Spree::Order.create + order = spree_line_item ? spree_line_item.order.dup : ::Spree::Order.create order.ship_address = subscription.shipping_address || subscription.user.ship_address if subscription order.freeze |