about summary refs log tree commit diff
path: root/app/models/announcement.rb
diff options
context:
space:
mode:
authorNick Schonning <nschonni@gmail.com>2023-02-20 13:20:56 -0500
committerGitHub <noreply@github.com>2023-02-21 03:20:56 +0900
commit9909b4b653d2f1cef662211a4b8e0b02cbb42fc1 (patch)
treec091455f619ef56ae4fc44100fd0dfb4890f6d76 /app/models/announcement.rb
parentd3b4d4d4f3ccee19f272c66e7c9acd803661e65b (diff)
Autofix Rubocop Rails/WhereEquals (#23759)
Diffstat (limited to 'app/models/announcement.rb')
-rw-r--r--app/models/announcement.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/announcement.rb b/app/models/announcement.rb
index 898bf3efa..339f5ae70 100644
--- a/app/models/announcement.rb
+++ b/app/models/announcement.rb
@@ -20,7 +20,7 @@
 class Announcement < ApplicationRecord
   scope :unpublished, -> { where(published: false) }
   scope :published, -> { where(published: true) }
-  scope :without_muted, ->(account) { joins("LEFT OUTER JOIN announcement_mutes ON announcement_mutes.announcement_id = announcements.id AND announcement_mutes.account_id = #{account.id}").where('announcement_mutes.id IS NULL') }
+  scope :without_muted, ->(account) { joins("LEFT OUTER JOIN announcement_mutes ON announcement_mutes.announcement_id = announcements.id AND announcement_mutes.account_id = #{account.id}").where(announcement_mutes: { id: nil }) }
   scope :chronological, -> { order(Arel.sql('COALESCE(announcements.starts_at, announcements.scheduled_at, announcements.published_at, announcements.created_at) ASC')) }
   scope :reverse_chronological, -> { order(Arel.sql('COALESCE(announcements.starts_at, announcements.scheduled_at, announcements.published_at, announcements.created_at) DESC')) }