changes generation of letter verification code
to keep generating six digit numbers but avoid starting with zero because can led to errors when sent to users.
This commit is contained in:
@@ -43,8 +43,9 @@ class Verification::Letter
|
||||
|
||||
private
|
||||
|
||||
# six-digit numbers, zero not the first digit
|
||||
def generate_verification_code
|
||||
rand.to_s[2..7]
|
||||
rand(100000..999999).to_s
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user