Sha256: 93dc41b7d6c79907f746459137a0db7588ed30819d8970300427e8c665705639

Contents?: true

Size: 703 Bytes

Versions: 58

Compression:

Stored size: 703 Bytes

Contents

# frozen_string_literal: true

module Decidim
  # Assembly type.
  class AssembliesType < ApplicationRecord
    include Decidim::Traceable
    include Decidim::Loggable
    include Decidim::TranslatableResource

    translatable_fields :title

    belongs_to :organization,
               foreign_key: "decidim_organization_id",
               class_name: "Decidim::Organization"

    has_many :assemblies,
             foreign_key: "decidim_assemblies_type_id",
             class_name: "Decidim::Assembly",
             dependent: :nullify

    validates :title, presence: true

    def self.log_presenter_class_for(_log)
      Decidim::Assemblies::AdminLog::AssembliesTypePresenter
    end
  end
end

Version data entries

58 entries across 58 versions & 1 rubygems

Version Path
decidim-assemblies-0.29.1 app/models/decidim/assemblies_type.rb
decidim-assemblies-0.28.4 app/models/decidim/assemblies_type.rb
decidim-assemblies-0.27.9 app/models/decidim/assemblies_type.rb
decidim-assemblies-0.29.0 app/models/decidim/assemblies_type.rb
decidim-assemblies-0.28.3 app/models/decidim/assemblies_type.rb
decidim-assemblies-0.27.8 app/models/decidim/assemblies_type.rb
decidim-assemblies-0.29.0.rc4 app/models/decidim/assemblies_type.rb
decidim-assemblies-0.29.0.rc3 app/models/decidim/assemblies_type.rb
decidim-assemblies-0.29.0.rc2 app/models/decidim/assemblies_type.rb
decidim-assemblies-0.29.0.rc1 app/models/decidim/assemblies_type.rb
decidim-assemblies-0.28.2 app/models/decidim/assemblies_type.rb
decidim-assemblies-0.27.7 app/models/decidim/assemblies_type.rb
decidim-assemblies-0.28.1 app/models/decidim/assemblies_type.rb
decidim-assemblies-0.27.6 app/models/decidim/assemblies_type.rb
decidim-assemblies-0.26.10 app/models/decidim/assemblies_type.rb
decidim-assemblies-0.26.9 app/models/decidim/assemblies_type.rb
decidim-assemblies-0.28.0 app/models/decidim/assemblies_type.rb
decidim-assemblies-0.27.5 app/models/decidim/assemblies_type.rb
decidim-assemblies-0.28.0.rc5 app/models/decidim/assemblies_type.rb
decidim-assemblies-0.28.0.rc4 app/models/decidim/assemblies_type.rb