about summary refs log tree commit diff
path: root/app/lib
diff options
context:
space:
mode:
authorNick Schonning <nschonni@gmail.com>2023-02-08 04:39:57 -0500
committerGitHub <noreply@github.com>2023-02-08 10:39:57 +0100
commit0592937264d7a8cb4f1ea56be403f48e0801b2b7 (patch)
treed2f6bff15de59e700b303bc196044d0e336d4096 /app/lib
parent11557d1c5a4ecb44cf602eabf0c9bd2882514b3a (diff)
Apply Rubocop Rails/WhereNot (#23448)
* Apply Rubocop Rails/WhereNot

* Update spec for where.not
Diffstat (limited to 'app/lib')
-rw-r--r--app/lib/vacuum/access_tokens_vacuum.rb4
1 files changed, 2 insertions, 2 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