Class: SolidusAdmin::Orders::Cart::Result::Component

Inherits:
BaseComponent
  • Object
show all
Defined in:
app/components/solidus_admin/orders/cart/result/component.rb

Instance Method Summary collapse

Constructor Details

#initialize(order:, variant:) ⇒ Component

Returns a new instance of Component.



6
7
8
9
10
# File 'app/components/solidus_admin/orders/cart/result/component.rb', line 6

def initialize(order:, variant:)
  @order = order
  @variant = variant
  @image = @variant.images.first || @variant.product.gallery.images.first
end