Update code_used to false after issues new code

This commit is contained in:
theworldbright 2015-11-22 16:04:08 -08:00
parent a4095692b7
commit 9f85a90f55

View file

@ -38,6 +38,7 @@ module Api
def create_code def create_code
SecureRandom.hex(32).tap do |code| SecureRandom.hex(32).tap do |code|
update!(code: code) update!(code: code)
update!(code_used: false)
end end
end end