Class: HasMailbox::Models::MessageCopy

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
lib/has_mailbox/models/message_copies.rb

Instance Method Summary collapse

Instance Method Details

#deleteObject



16
17
18
# File 'lib/has_mailbox/models/message_copies.rb', line 16

def delete
  self.destroy
end

#fromObject



20
21
22
# File 'lib/has_mailbox/models/message_copies.rb', line 20

def from
	"#{self.sent_messageable_type}".constantize.find_by_id(self.sent_messageable_id)
end

#toObject



24
25
26
# File 'lib/has_mailbox/models/message_copies.rb', line 24

def to
	"#{self.sent_messageable_type}".constantize.find_by_id(self.recipient_id)
end