Sha256: 01ecc2108220b6a89c1e8349f8208d8973f524c4957ec1f1900728e3709e7958

Contents?: true

Size: 450 Bytes

Versions: 62

Compression:

Stored size: 450 Bytes

Contents

module Workarea
  module Admin
    module Reports
      class SalesByTrafficReferrerViewModel < ApplicationViewModel
        def results
          @results ||= model.results.map do |result|
            processed = {
              medium: result['_id']['medium']&.titleize,
              source: result['_id']['source']&.titleize
            }.merge(result)

            OpenStruct.new(processed)
          end
        end
      end
    end
  end
end

Version data entries

62 entries across 62 versions & 1 rubygems

Version Path
workarea-admin-3.4.13 app/view_models/workarea/admin/reports/sales_by_traffic_referrer_view_model.rb
workarea-admin-3.4.12 app/view_models/workarea/admin/reports/sales_by_traffic_referrer_view_model.rb