Class: Decidim::Core::BaseInputSort
- Inherits:
-
GraphQL::Schema::InputObject
- Object
- GraphQL::Schema::InputObject
- Decidim::Core::BaseInputSort
- Defined in:
- decidim-core/lib/decidim/api/input_sorts/base_input_sort.rb
Direct Known Subclasses
Blogs::PostInputSort, ComponentInputSort, ParticipatorySpaceInputSort, UserEntityInputSort, ParticipatoryProcesses::ParticipatoryProcessInputSort, Proposals::ProposalInputSort
Instance Method Summary collapse
-
#prepare ⇒ Object
Overwrite the prepare method to allow 2 possible values only.
Instance Method Details
#prepare ⇒ Object
Overwrite the prepare method to allow 2 possible values only
7 8 9 10 11 12 13 14 |
# File 'decidim-core/lib/decidim/api/input_sorts/base_input_sort.rb', line 7 def prepare arguments.each do |key, value| next if key.to_s == "locale" next if value.respond_to?(:call) raise GraphQL::ExecutionError, "Invalid order value for #{key.inspect}, only ASC or DESC are valids (received #{value.inspect})" unless valid_order?(value) end super end |