Module: Convo::HasConvo
Instance Method Summary collapse
Instance Method Details
#conversations ⇒ Object
29 30 31 32 |
# File 'lib/convo/has_convo.rb', line 29 def conversations Convo::Topic.where(model_class: self.class.name) .where("? = ANY(participant_ids)", id) end |
#send_message(to:, body:) ⇒ Object
21 22 23 24 25 26 27 |
# File 'lib/convo/has_convo.rb', line 21 def (to:, body:) Convo::Topic.( sender: self, recipients: Array(to), body: body ) end |