Closed masarakki closed 5 years ago
what are the cases when the otp_column is blank " "? could you paste an example for illustration?
in my case, I created table with
t.string :otp_secret_key, null: false, default: ''
so,
user = User.new
user.otp_secret_key
# => ""
user.save
user.otp_secret_key
# => ""
I think using blank?
is better to fill blank column.
@masarakki Why would you be setting the otp_secret_key
manually if you have has_one_time_password
declared? has_one_time_password
will always generate it before create the record
can't generate secret when otp_secret_key == ''