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:
Juanjo Bazán
2015-10-27 13:32:38 +01:00
parent 912deb38b2
commit bd4168ef75

View File

@@ -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