Sha256: ff64e00207db7b19bd80d91fae046cb4704c985139a054f54c687b7ab2421277

Contents?: true

Size: 626 Bytes

Versions: 21

Compression:

Stored size: 626 Bytes

Contents

# frozen_string_literal: true

module Decidim
  # Scope types allows to use different types of scopes in participatory process
  # (municipalities, provinces, states, countries, etc.)
  class ScopeType < ApplicationRecord
    include Decidim::TranslatableResource

    translatable_fields :name, :plural
    belongs_to :organization,
               foreign_key: "decidim_organization_id",
               class_name: "Decidim::Organization",
               inverse_of: :scope_types

    has_many :scopes, class_name: "Decidim::Scope", inverse_of: :scope_type, dependent: :nullify

    validates :name, presence: true
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
decidim-core-0.26.5 app/models/decidim/scope_type.rb
decidim-core-0.26.4 app/models/decidim/scope_type.rb
decidim-core-0.26.3 app/models/decidim/scope_type.rb
decidim-core-0.26.2 app/models/decidim/scope_type.rb
decidim-core-0.26.1 app/models/decidim/scope_type.rb
decidim-core-0.26.0 app/models/decidim/scope_type.rb
decidim-core-0.26.0.rc2 app/models/decidim/scope_type.rb
decidim-core-0.26.0.rc1 app/models/decidim/scope_type.rb
decidim-core-0.25.2 app/models/decidim/scope_type.rb
decidim-core-0.25.1 app/models/decidim/scope_type.rb
decidim-core-0.25.0 app/models/decidim/scope_type.rb
decidim-core-0.25.0.rc4 app/models/decidim/scope_type.rb
decidim-core-0.25.0.rc3 app/models/decidim/scope_type.rb
decidim-core-0.25.0.rc2 app/models/decidim/scope_type.rb
decidim-core-0.25.0.rc1 app/models/decidim/scope_type.rb
decidim-core-0.24.3 app/models/decidim/scope_type.rb
decidim-core-0.24.2 app/models/decidim/scope_type.rb
decidim-core-0.24.1 app/models/decidim/scope_type.rb
decidim-core-0.24.0 app/models/decidim/scope_type.rb
decidim-core-0.24.0.rc2 app/models/decidim/scope_type.rb