FIX revert system_notification_histories

This commit is contained in:
jasder
2021-10-29 16:00:46 +08:00
parent ab2e1ffa0e
commit 6c67b92bb1
10 changed files with 178 additions and 44 deletions
+3
View File
@@ -15,6 +15,9 @@ class SystemNotification < ApplicationRecord
default_scope { order(created_at: :desc)}
has_many :system_notification_histories
has_many :users, through: :system_notification_histories
scope :is_top, lambda { where(is_top: true) }
def read_member?(user_id)