Sha256: 99c127be4c1213ff91d5b7b247854c300db1d798c654dec6e21c4741d226098d

Contents?: true

Size: 572 Bytes

Versions: 9

Compression:

Stored size: 572 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module Core
    module HasEndorsableInputSort
      def self.included(child_class)
        child_class.argument :endorsement_count,
                             type: String,
                             description: "Sort by number of endorsements, valid values are ASC or DESC",
                             required: false,
                             prepare: ->(value, _ctx) do
                                        { endorsements_count: value }
                                      end
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
decidim-core-0.23.6 app/types/decidim/core/has_endorsable_input_sort.rb
decidim-core-0.23.5 app/types/decidim/core/has_endorsable_input_sort.rb
decidim-core-0.23.4 app/types/decidim/core/has_endorsable_input_sort.rb
decidim-core-0.23.3 app/types/decidim/core/has_endorsable_input_sort.rb
decidim-core-0.23.2 app/types/decidim/core/has_endorsable_input_sort.rb
decidim-core-0.23.1 app/types/decidim/core/has_endorsable_input_sort.rb
decidim-core-0.23.1.rc1 app/types/decidim/core/has_endorsable_input_sort.rb
decidim-core-0.23.0 app/types/decidim/core/has_endorsable_input_sort.rb
decidim-core-0.22.0 app/types/decidim/core/has_endorsable_input_sort.rb