Module: SolidusSubscriptions::Spree::Api::LineItemsController::CreateSubscriptionLineItems

Includes:
SolidusSubscriptions::SubscriptionLineItemBuilder
Defined in:
lib/decorators/api/controllers/solidus_subscriptions/spree/api/line_items_controller/create_subscription_line_items.rb

Class Method Summary collapse

Class Method Details

.prepended(base) ⇒ Object



17
18
19
20
21
22
23
# File 'lib/decorators/api/controllers/solidus_subscriptions/spree/api/line_items_controller/create_subscription_line_items.rb', line 17

def self.prepended(base)
  base.after_action(
    :handle_subscription_line_items,
    only: [:create, :update],
    if: ->{ params[:subscription_line_item] }
  )
end