Remove `TotpRecoveryCode.remove_all_for(user)` method
This commit is contained in:
parent
2e6f49819a
commit
277799ff4b
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue