Sha256: d3ffb88a5194290e5c265ed5a1f343307fb575182a4762295fd24df73d8e68d0
Contents?: true
Size: 395 Bytes
Versions: 16
Compression:
Stored size: 395 Bytes
Contents
module Comee module Core class Notification < ApplicationRecord include Noticed::Model belongs_to :recipient, polymorphic: true def message {id: id, read: !read_at.nil?, created_at: created_at}.merge(to_notification.message) end def self.messages(notifications) notifications.includes(:recipient).map(&:message) end end end end
Version data entries
16 entries across 16 versions & 1 rubygems