Sha256: d8b8969d79d64ed2995c1d3bf5ec0dea53dada9f875dd3f1454d7936651ba0a5
Contents?: true
Size: 338 Bytes
Versions: 15
Compression:
Stored size: 338 Bytes
Contents
class Notification < ApplicationRecord belongs_to :user belongs_to :organization belongs_to :target, polymorphic: true scope :notified_users_ids_for, ->(target, organization=Organization.current) do where(target: target, organization: organization).pluck(:user_id) end def mark_as_read! update read: true end end
Version data entries
15 entries across 15 versions & 1 rubygems