From 277799ff4b669b27bde7356f7489a7a0fd1a46f9 Mon Sep 17 00:00:00 2001 From: Dominik Kwiatek Date: Sun, 15 Nov 2020 22:09:27 +0100 Subject: [PATCH] Remove `TotpRecoveryCode.remove_all_for(user)` method --- app/models/totp_recovery_code.rb | 6 ------ 1 file changed, 6 deletions(-) diff --git a/app/models/totp_recovery_code.rb b/app/models/totp_recovery_code.rb index b8a3b479..846f52d8 100644 --- a/app/models/totp_recovery_code.rb +++ b/app/models/totp_recovery_code.rb @@ -8,10 +8,4 @@ class TotpRecoveryCode < ApplicationRecord def self.generate_for(user) TotpRecoveryCode.create!(Array.new(16) { {user: user, code: SecureRandom.base58(8).downcase} }) end - - # @param user [User] - # @return [Integer] - def self.remove_all_for(user) - TotpRecoveryCode.where(user: user).delete_all - end end