Sha256: dc7e8dff19b1bf3acf2d78fe6772d9bc462b9a67b50496986bf239b168a383de
Contents?: true
Size: 535 Bytes
Versions: 34
Compression:
Stored size: 535 Bytes
Contents
module Workarea module Admin class RecommendationsViewModel < ApplicationViewModel def sources_display t('workarea.admin.recommendations.sources') end def products @products ||= begin models = Catalog::Product.any_in(id: product_ids).to_a product_ids.map do |id| model = models.detect { |m| m.id == id } next unless model ProductViewModel.new(model) end.compact end end end end end
Version data entries
34 entries across 34 versions & 1 rubygems