Sha256: 5c71ae45b57dd61fc62938418b4cd38c36479fdddb26df0f821d10c08ac5b9cc
Contents?: true
Size: 596 Bytes
Versions: 62
Compression:
Stored size: 596 Bytes
Contents
module Workarea module Search class AdminDiscounts include Query include AdminIndexSearch include AdminSorting include Pagination document Search::Admin def initialize(params = {}) super(params.merge(type: 'discount')) end def facets super + [TermsFacet.new(self, 'discount_type')] end def sort result = super || [] if params[:sort] == Sort.redemptions.to_s result.prepend(Sort.redemptions.field => Sort.redemptions.direction) end result end end end end
Version data entries
62 entries across 62 versions & 1 rubygems