Sha256: b0847d5ec267ac0e97283f26c7813c885414da7b9d64cf3b9c73c68ae2ca40fe
Contents?: true
Size: 648 Bytes
Versions: 25
Compression:
Stored size: 648 Bytes
Contents
# frozen_string_literal: true module Decidim module Core # This interface represents a commentable object. module AuthorableInterface include Decidim::Api::Types::BaseInterface description "An interface that can be used in authorable objects." field :author, Decidim::Core::AuthorInterface, "The resource author", null: true do # can be an Authorable or a Coauthorable end def author if object.respond_to?(:normalized_author) object&.normalized_author elsif object.respond_to?(:creator_identity) object&.creator_identity end end end end end
Version data entries
25 entries across 25 versions & 1 rubygems