Sha256: 65eaffbb5b73bd7d34761538465b43ec3f6a1941630ac74bfa5ba8ad1c4253e6
Contents?: true
Size: 405 Bytes
Versions: 5
Compression:
Stored size: 405 Bytes
Contents
module FortyFacets # Represents the ordering for a specific search Order = Struct.new(:search, :definition, :active) do def title definition.title end # Returns a search with the same filter ordered by this criteria def by new_params = search.params || {} new_params[:order] = definition.request_value search.class.new_unwrapped(new_params) end end end
Version data entries
5 entries across 5 versions & 1 rubygems