Class: Comee::Core::Notification

Inherits:
ApplicationRecord show all
Includes:
Noticed::Model
Defined in:
app/models/comee/core/notification.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.messages(notifications) ⇒ Object



12
13
14
# File 'app/models/comee/core/notification.rb', line 12

def self.messages(notifications)
  notifications.map(&:message)
end

Instance Method Details

#messageObject



8
9
10
# File 'app/models/comee/core/notification.rb', line 8

def message
  {id: id, read: !read_at.nil?, created_at: created_at}.merge(to_notification.message)
end