From 1deb128c6e013e43f890e60bea730dd03f275cdf Mon Sep 17 00:00:00 2001 From: Guillermo Iguaran Date: Tue, 25 Apr 2023 01:44:37 -0700 Subject: [PATCH] Fix broken code from previous commit --- lib/active_model/one_time_password.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/active_model/one_time_password.rb b/lib/active_model/one_time_password.rb index f1fa352..c926abc 100644 --- a/lib/active_model/one_time_password.rb +++ b/lib/active_model/one_time_password.rb @@ -172,7 +172,7 @@ def hotp_code(options = {}) end def totp_code(options = {}) - time = if options.is_a?(Hash) ? options.fetch(:time, Time.now) : options + time = options.is_a?(Hash) ? options.fetch(:time, Time.now) : options ROTP::TOTP.new(otp_column, digits: otp_digits, interval: otp_interval).at(time) end