Class: QuoVadis::RecoveryCode

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/quo_vadis/recovery_code.rb

Instance Method Summary collapse

Instance Method Details

#authenticate_code(plaintext_code) ⇒ Object

Returns true and destroys this instance if the plaintext code is authentic, false otherwise.



11
12
13
# File 'app/models/quo_vadis/recovery_code.rb', line 11

def authenticate_code(plaintext_code)
  !!(destroy if super)
end