Sha256: 87e9c08ef8d4fce278dcf0d918692d95e24802568098ffcbbbae02bcbf0c1c04
Contents?: true
Size: 775 Bytes
Versions: 19
Compression:
Stored size: 775 Bytes
Contents
# frozen_string_literal: true module Decidim module Messaging # # Holds a many-to-many relationship between conversations and their participants # class Participation < ApplicationRecord self.table_name = "decidim_messaging_participations" belongs_to :conversation, foreign_key: :decidim_conversation_id, class_name: "Decidim::Messaging::Conversation", inverse_of: :participations belongs_to :participant, foreign_key: :decidim_participant_id, class_name: "Decidim::UserBaseEntity" validates :conversation, :participant, presence: true validates :decidim_conversation_id, uniqueness: { scope: :decidim_participant_id } end end end
Version data entries
19 entries across 19 versions & 1 rubygems