Sha256: 7cd89cd5b38d31b61614043c2221a38a022bb17d901d8d2512f7dc13ff372783
Contents?: true
Size: 493 Bytes
Versions: 43
Compression:
Stored size: 493 Bytes
Contents
module ForestAdminDatasourceToolkit module Validations class SortValidator def self.validate(collection, sort) sort&.each do |s| FieldValidator.validate(collection, s[:field]) unless s[:ascending].is_a?(TrueClass) || s[:ascending].is_a?(FalseClass) raise ForestAdminDatasourceToolkit::Exceptions::ValidationError, "Invalid sort_utils.ascending value: #{s[:ascending]}" end end end end end end
Version data entries
43 entries across 43 versions & 1 rubygems