Sha256: 74ded9f8cc3b3a86564047bf97bbdb083c1f20f14be026d176adf40e0942570f

Contents?: true

Size: 314 Bytes

Versions: 5

Compression:

Stored size: 314 Bytes

Contents

# frozen_string_literal: true

class SolidusAdmin::Orders::Cart::Result::Component < SolidusAdmin::BaseComponent
  with_collection_parameter :variant

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

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
solidus_admin-0.3.2 app/components/solidus_admin/orders/cart/result/component.rb
solidus_admin-0.3.1 app/components/solidus_admin/orders/cart/result/component.rb
solidus_admin-0.3.0 app/components/solidus_admin/orders/cart/result/component.rb
solidus_admin-0.2.0 app/components/solidus_admin/orders/cart/result/component.rb
solidus_admin-0.1.0 app/components/solidus_admin/orders/cart/result/component.rb