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

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

Class Method Summary collapse

Class Method Details

.prepended(base) ⇒ Object


15
16
17
18
19
20
21
# File 'app/decorators/controllers/solidus_subscriptions/spree/api/line_items_controller/create_subscription_line_items.rb', line 15

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