Closed antonror closed 6 years ago
Phone has no '+' at that moment because of sanitizing https://github.com/rubykube/barong/blob/master/app/controllers/phones_controller.rb#L66
@maksim-litvinov correct, but please check session[:phone]
. No sanitizing applies to session[:phone]
, it is extracted straight from session hash. And, when entered with +, like +380999999999
, the code compares +380999999999
to 380999999999
. That was the issue
When adding new phone, the form suggests to start with
+
Later, whencheck_phone
comparessession[:phone]
with@phone_number
extracted from params, the following happens:With the actual data, it goes down to
return if
doesn't apply correctly and there's always Confirmation code was sent to another number errorPossibly