Sha256: 39849c98565752981e3b7b23b3e0c92183818b80a15f217e0e1416a6123428ec

Contents?: true

Size: 818 Bytes

Versions: 44

Compression:

Stored size: 818 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) }

      has_one_attached :logo
      validates_avatar :logo, uploader: 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

44 entries across 44 versions & 1 rubygems

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