Sha256: e3785b0ef6b2ba14273b6d32c77bbad9dc54b4793f7599c9c4f56d8eeb2cc1df
Contents?: true
Size: 688 Bytes
Versions: 26
Compression:
Stored size: 688 Bytes
Contents
module Workarea module Search class Admin class PricingDiscount < Search::Admin include Admin::Releasable def type 'discount' end def search_text "discount #{model.name}" end def jump_to_text model.name end def jump_to_position 9 end def keywords super + Array.wrap(model.try(:promo_codes)) end def facets super.merge(discount_type: model.class.name.demodulize.titleize) end def as_document super.merge(total_redemptions: model.redemptions.count) end end end end end
Version data entries
26 entries across 26 versions & 1 rubygems