Class: MailItem

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
lib/generators/private_mail/install/models/mail_item.rb

Instance Method Summary collapse

Instance Method Details

#mark_as_readObject

sets the read attribute of the mail message to true.



7
8
9
# File 'lib/generators/private_mail/install/models/mail_item.rb', line 7

def mark_as_read()
  update_attribute('read', true)
end

#mark_as_unreadObject

sets the read attribute of the mail message to false.



12
13
14
# File 'lib/generators/private_mail/install/models/mail_item.rb', line 12

def mark_as_unread()
  update_attribute('read', false)
end