Sha256: 1b579565b14bf04435497afdec7bbfbff52aa4ea4672bbeb1712e9b4b59d9cbb
Contents?: true
Size: 644 Bytes
Versions: 52
Compression:
Stored size: 644 Bytes
Contents
# frozen_string_literal: true module Decidim module Core # This interface represents an object capable of endorsements. module EndorsableInterface include Decidim::Api::Types::BaseInterface description "An interface that can be used in objects with endorsements" field :endorsements, [Decidim::Core::AuthorInterface, { null: true }], "The endorsements of this object.", null: false def endorsements object.endorsements.map(&:normalized_author) end field :endorsements_count, Integer, description: "The total amount of endorsements the object has received", null: true end end end
Version data entries
52 entries across 52 versions & 1 rubygems