Sha256: b5ec6125cfcc9b460f9a6db49c9936e74820ba5874accf0d3d9a2938576e1857

Contents?: true

Size: 806 Bytes

Versions: 14

Compression:

Stored size: 806 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module Conferences
    # It represents a partner of the conference
    class Partner < ApplicationRecord
      include Decidim::Traceable
      include Decidim::Loggable
      include Decidim::HasUploadValidations

      TYPES = %w(main_promotor collaborator).freeze

      belongs_to :conference, foreign_key: "decidim_conference_id", class_name: "Decidim::Conference"

      default_scope { order(partner_type: :desc, weight: :asc) }

      validates_avatar :logo
      mount_uploader :logo, Decidim::Conferences::PartnerLogoUploader

      delegate :organization, to: :conference

      alias participatory_space conference

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

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
decidim-conferences-0.24.3 app/models/decidim/conferences/partner.rb
decidim-conferences-0.23.6 app/models/decidim/conferences/partner.rb
decidim-conferences-0.24.2 app/models/decidim/conferences/partner.rb
decidim-conferences-0.23.5 app/models/decidim/conferences/partner.rb
decidim-conferences-0.24.1 app/models/decidim/conferences/partner.rb
decidim-conferences-0.24.0 app/models/decidim/conferences/partner.rb
decidim-conferences-0.24.0.rc2 app/models/decidim/conferences/partner.rb
decidim-conferences-0.23.4 app/models/decidim/conferences/partner.rb
decidim-conferences-0.24.0.rc1 app/models/decidim/conferences/partner.rb
decidim-conferences-0.23.3 app/models/decidim/conferences/partner.rb
decidim-conferences-0.23.2 app/models/decidim/conferences/partner.rb
decidim-conferences-0.23.1 app/models/decidim/conferences/partner.rb
decidim-conferences-0.23.1.rc1 app/models/decidim/conferences/partner.rb
decidim-conferences-0.23.0 app/models/decidim/conferences/partner.rb