Class: SolidusAdmin::Orders::Cart::Result::Component
- Inherits:
-
BaseComponent
- Object
- BaseComponent
- SolidusAdmin::Orders::Cart::Result::Component
- Defined in:
- app/components/solidus_admin/orders/cart/result/component.rb
Instance Method Summary collapse
-
#initialize(order:, variant:) ⇒ Component
constructor
A new instance of Component.
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 |