Sha256: 0fb82dc04bd29681f9dc2237e50232e7e3046a4d20ae4c158e8f5a10fd08ac09
Contents?: true
Size: 705 Bytes
Versions: 40
Compression:
Stored size: 705 Bytes
Contents
# frozen_string_literal: true module Decidim module Messaging # # Holds a many-to-many relationship between conversations and their participants # class Participation < ApplicationRecord 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::User" validates :conversation, :participant, presence: true validates :decidim_conversation_id, uniqueness: { scope: :decidim_participant_id } end end end
Version data entries
40 entries across 40 versions & 1 rubygems