Sha256: 853590e3d183ca9907324ed2c52221e3e26937ab61df64128cfd953c66f94ab4

Contents?: true

Size: 568 Bytes

Versions: 1

Compression:

Stored size: 568 Bytes

Contents

# Spree::Orders may contain many subscription_line_items. When the order is
# finalized these subscription_line_items are converted into subscritpions.
# The order needs to be able to get a list of associated subscription_line_items
# to be able to populate the full subscriptions.
module Spree
  module Orders
    module SubscriptionLineItemsAssociation
      def self.prepended(base)
        base.has_many :subscription_line_items, through: :line_items
      end
    end
  end
end

Spree::Order.prepend Spree::Orders::SubscriptionLineItemsAssociation

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
solidus_subscriptions-alpha-0.0.4 app/decorators/spree/orders/subscription_line_items_association.rb