app/components/solidus_admin/ui/thumbnail/component.rb in solidus_admin-0.2.0 vs app/components/solidus_admin/ui/thumbnail/component.rb in solidus_admin-0.3.0
- old
+ new
@@ -29,10 +29,10 @@
")
end
def self.for(record, **attrs)
case record
- when Spree::PromotionAction then new(icon: "megaphone-line", **attrs)
+ when *Spree::Config.adjustment_promotion_source_types then new(icon: "megaphone-line", **attrs)
when Spree::UnitCancel then new(icon: "close-circle-line", **attrs)
when Spree::TaxRate then new(icon: "percent-line", **attrs)
when Spree::LineItem then self.for(record.variant, **attrs)
when Spree::Product then self.for((record.images.first || record.master.images.first), **attrs)
when Spree::Variant then self.for((record.images.first || record.product), **attrs)