Sha256: 888f168c64bd86b2a912814039f9ed70c282b4e1f3129b0f93ba836e6bf80fba

Contents?: true

Size: 456 Bytes

Versions: 3

Compression:

Stored size: 456 Bytes

Contents

# frozen_string_literal: true

class SolidusAdmin::Orders::Show::Adjustments::Index::Adjustable::SpreeLineItem::Component < SolidusAdmin::Orders::Show::Adjustments::Index::Adjustable::Component
  delegate :variant, to: :adjustable

  def caption
    options_text = variant.options_text.presence
    options_text || variant.sku
  end

  def detail
    link_to(variant.product.name, solidus_admin.product_path(variant.product), class: "body-link")
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
solidus_admin-0.3.2 app/components/solidus_admin/orders/show/adjustments/index/adjustable/spree_line_item/component.rb
solidus_admin-0.3.1 app/components/solidus_admin/orders/show/adjustments/index/adjustable/spree_line_item/component.rb
solidus_admin-0.3.0 app/components/solidus_admin/orders/show/adjustments/index/adjustable/spree_line_item/component.rb