diff --git a/app/models/user_notification.rb b/app/models/user_notification.rb index 17f9eb275..a99b05895 100644 --- a/app/models/user_notification.rb +++ b/app/models/user_notification.rb @@ -23,9 +23,6 @@ class UserNotification < ActiveRecord::Base end def self.seen_by_user(user) - where(user: user).map do |n| - n.checked = true - n.save - end + where(user: user).where(checked: false).update_all(checked: true) end end