about summary refs log tree commit diff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/lib/vacuum/access_tokens_vacuum.rb4
-rw-r--r--app/models/session_activation.rb2
2 files changed, 3 insertions, 3 deletions
diff --git a/app/lib/vacuum/access_tokens_vacuum.rb b/app/lib/vacuum/access_tokens_vacuum.rb
index 4f3878027..7b91f74a5 100644
--- a/app/lib/vacuum/access_tokens_vacuum.rb
+++ b/app/lib/vacuum/access_tokens_vacuum.rb
@@ -9,10 +9,10 @@ class Vacuum::AccessTokensVacuum
   private
 
   def vacuum_revoked_access_tokens!
-    Doorkeeper::AccessToken.where('revoked_at IS NOT NULL').where('revoked_at < NOW()').delete_all
+    Doorkeeper::AccessToken.where.not(revoked_at: nil).where('revoked_at < NOW()').delete_all
   end
 
   def vacuum_revoked_access_grants!
-    Doorkeeper::AccessGrant.where('revoked_at IS NOT NULL').where('revoked_at < NOW()').delete_all
+    Doorkeeper::AccessGrant.where.not(revoked_at: nil).where('revoked_at < NOW()').delete_all
   end
 end
diff --git a/app/models/session_activation.rb b/app/models/session_activation.rb
index 3a59bad93..0b7fa6fe4 100644
--- a/app/models/session_activation.rb
+++ b/app/models/session_activation.rb
@@ -59,7 +59,7 @@ class SessionActivation < ApplicationRecord
     end
 
     def exclusive(id)
-      where('session_id != ?', id).destroy_all
+      where.not(session_id: id).destroy_all
     end
   end