Sha256: e3e69f9a1639dd4de1b02f590f968252f89b0d9dcb12fb65ee4aab9f44e4cd68

Contents?: true

Size: 489 Bytes

Versions: 7

Compression:

Stored size: 489 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module Core
    class OrganizationType < Decidim::Api::Types::BaseObject
      description "The current organization"

      field :name, Decidim::Core::TranslatedFieldType, "The name of the current organization", null: true

      field :stats, [Core::StatisticType, { null: true }], description: "The statistics associated to this object", null: true

      def stats
        Decidim.stats.with_context(object)
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
decidim-core-0.29.2 lib/decidim/api/types/organization_type.rb
decidim-core-0.29.1 lib/decidim/api/types/organization_type.rb
decidim-core-0.29.0 lib/decidim/api/types/organization_type.rb
decidim-core-0.29.0.rc4 lib/decidim/api/types/organization_type.rb
decidim-core-0.29.0.rc3 lib/decidim/api/types/organization_type.rb
decidim-core-0.29.0.rc2 lib/decidim/api/types/organization_type.rb
decidim-core-0.29.0.rc1 lib/decidim/api/types/organization_type.rb