mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-10 17:36:33 +08:00
Merge pull request #6810 from artoscinote/ma_SCI_9896
Fix in-app notification scope [SCI-9896][SCI-9874]
This commit is contained in:
commit
b9e14b0706
2 changed files with 4 additions and 2 deletions
|
@ -32,7 +32,7 @@ module Reports
|
|||
subject_class: 'Report',
|
||||
subject_name: report.name,
|
||||
report_type: 'docx',
|
||||
user: @user
|
||||
user: user
|
||||
}
|
||||
)
|
||||
|
||||
|
|
|
@ -5,7 +5,9 @@ class Notification < ApplicationRecord
|
|||
|
||||
belongs_to :recipient, polymorphic: true
|
||||
|
||||
scope :in_app, -> { where.not("notifications.params->'hide_in_app' = 'true'") }
|
||||
scope :in_app, lambda {
|
||||
where.not("notifications.params ? 'hide_in_app' AND notifications.params->'hide_in_app' = 'true'")
|
||||
}
|
||||
|
||||
private
|
||||
|
||||
|
|
Loading…
Reference in a new issue