Class: Integral::Notification::Notification

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

Instance Method Summary collapse

Methods inherited from ApplicationRecord

available_statuses

Instance Method Details

#read!Object



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

def read!
  update!(read_at: Time.now())
end

#to_partial_pathObject



23
24
25
# File 'app/models/integral/notification/notification.rb', line 23

def to_partial_path
  'integral/backend/notifications/notification'
end

#unread?Boolean

Returns:

  • (Boolean)


19
20
21
# File 'app/models/integral/notification/notification.rb', line 19

def unread?
  read_at.nil?
end