Sha256: a818f20f96e6413806c6c69f8192f0bb7b8bdd1ab7bb9e04cf833901815f7c57
Contents?: true
Size: 495 Bytes
Versions: 62
Compression:
Stored size: 495 Bytes
Contents
module Workarea module Storefront module ContentBlocks class ProductListViewModel < ContentBlockViewModel def locals super.merge(products: products) end def products return [] unless data['products'].present? @products ||= Catalog::Product .find_ordered_for_display(data['products']) .map { |product| ProductViewModel.wrap(product) } end end end end end
Version data entries
62 entries across 62 versions & 1 rubygems