Sha256: c172e5f810597205a07ccb0b12110d67a12181d822cf7f259c3a647d1dfa72f8
Contents?: true
Size: 419 Bytes
Versions: 3
Compression:
Stored size: 419 Bytes
Contents
# frozen_string_literal: true module Blacklight class Configuration::SortField < Blacklight::Configuration::Field def normalize! blacklight_config = nil super self.field ||= self.label.try(:parameterize) self.field ||= self.sort self.sort ||= self.field self end def validate! raise ArgumentError.new("Must supply a sort string") if self.sort.nil? end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
blacklight-6.0.2 | lib/blacklight/configuration/sort_field.rb |
blacklight-6.0.1 | lib/blacklight/configuration/sort_field.rb |
blacklight-6.0.0 | lib/blacklight/configuration/sort_field.rb |