Commit 1ebc5fb8baefb7ba67c6580bfe05b553a78b7fc5
1 parent
eac38096
Exists in
master
and in
1 other branch
App: fix lambda syntax
Showing
1 changed file
with
2 additions
and
2 deletions
Show diff stats
app/models/app.rb
| @@ -53,9 +53,9 @@ class App | @@ -53,9 +53,9 @@ class App | ||
| 53 | reject_if: proc { |attrs| !NotificationService.subclasses.map(&:to_s).include?(attrs[:type].to_s) } | 53 | reject_if: proc { |attrs| !NotificationService.subclasses.map(&:to_s).include?(attrs[:type].to_s) } |
| 54 | accepts_nested_attributes_for :notice_fingerprinter | 54 | accepts_nested_attributes_for :notice_fingerprinter |
| 55 | 55 | ||
| 56 | - scope :watched_by, ->(user) do | 56 | + scope :watched_by, lambda { |user| |
| 57 | where watchers: { "$elemMatch" => { "user_id" => user.id } } | 57 | where watchers: { "$elemMatch" => { "user_id" => user.id } } |
| 58 | - end | 58 | + } |
| 59 | 59 | ||
| 60 | def watched_by?(user) | 60 | def watched_by?(user) |
| 61 | watchers.pluck("user_id").include? user.id | 61 | watchers.pluck("user_id").include? user.id |