Sha256: c2a6051d21567f7e2d39b6a5d29335a03c1f3b48160305103c86c1afb661de9a

Contents?: true

Size: 1020 Bytes

Versions: 13

Compression:

Stored size: 1020 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module Conferences
    # It represents a registration type of the conference
    class RegistrationType < ApplicationRecord
      include Decidim::Publicable
      include Decidim::Traceable
      include Decidim::Loggable

      belongs_to :conference, foreign_key: "decidim_conference_id", class_name: "Decidim::Conference"
      has_many :conference_meeting_registration_types, dependent: :destroy
      has_many :conference_meetings, through: :conference_meeting_registration_types, foreign_key: "registration_type_id", class_name: "Decidim::ConferenceMeeting"
      has_many :conference_registrations, foreign_key: "decidim_conference_registration_type_id", class_name: "Decidim::Conferences::ConferenceRegistration", dependent: :destroy

      default_scope { order(weight: :asc) }

      alias participatory_space conference

      def self.log_presenter_class_for(_log)
        Decidim::Conferences::AdminLog::RegistrationTypePresenter
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
decidim-conferences-0.22.0 app/models/decidim/conferences/registration_type.rb
decidim-conferences-0.21.0 app/models/decidim/conferences/registration_type.rb
decidim-conferences-0.20.1 app/models/decidim/conferences/registration_type.rb
decidim-conferences-0.20.0 app/models/decidim/conferences/registration_type.rb
decidim-conferences-0.19.1 app/models/decidim/conferences/registration_type.rb
decidim-conferences-0.18.1 app/models/decidim/conferences/registration_type.rb
decidim-conferences-0.19.0 app/models/decidim/conferences/registration_type.rb
decidim-conferences-0.17.2 app/models/decidim/conferences/registration_type.rb
decidim-conferences-0.18.0 app/models/decidim/conferences/registration_type.rb
decidim-conferences-0.17.1 app/models/decidim/conferences/registration_type.rb
decidim-conferences-0.16.1 app/models/decidim/conferences/registration_type.rb
decidim-conferences-0.17.0 app/models/decidim/conferences/registration_type.rb
decidim-conferences-0.16.0 app/models/decidim/conferences/registration_type.rb