Class: SaasPlatform::Notification

Inherits:
ApplicationRecord show all
Defined in:
app/models/saas_platform/notification.rb

Instance Method Summary collapse

Instance Method Details

#mark_as_read!Object



15
16
17
# File 'app/models/saas_platform/notification.rb', line 15

def mark_as_read!
  update!(read_at: Time.current)
end

#read?Boolean

Returns:

  • (Boolean)


11
12
13
# File 'app/models/saas_platform/notification.rb', line 11

def read?
  read_at.present?
end