Sha256: 60334029880cb1955b15a1dae3cccf69a0b6e29f935b39c9a388a5e3fec8f99e
Contents?: true
Size: 641 Bytes
Versions: 18
Compression:
Stored size: 641 Bytes
Contents
module MessageTrain # Ignore model class Ignore < ActiveRecord::Base belongs_to :participant, polymorphic: true belongs_to( :conversation, foreign_key: :message_train_conversation_id, touch: true ) validates_presence_of :conversation, :participant scope :find_all_by_participant, (lambda do |participant| where(participant: participant) end) def self.conversations MessageTrain::Conversation.joins(:ignores) .where( message_train_ignores: { id: where(nil) } ) end end end
Version data entries
18 entries across 18 versions & 1 rubygems