mirror of
https://github.com/Retrospring/retrospring.git
synced 2025-01-18 20:26:01 +01:00
Remove TotpRecoveryCode.remove_all_for(user)
method
This commit is contained in:
parent
2e6f49819a
commit
277799ff4b
1 changed files with 0 additions and 6 deletions
|
@ -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 a new issue