rescues ahoy error stoping user verifications

This commit is contained in:
Juanjo Bazán
2016-01-29 11:41:16 +01:00
parent 75f03499bc
commit 73aea8f127

View File

@@ -28,7 +28,7 @@ class Verification::SmsController < ApplicationController
@sms = Verification::Sms.new(sms_params.merge(user: current_user)) @sms = Verification::Sms.new(sms_params.merge(user: current_user))
if @sms.verified? if @sms.verified?
current_user.update(confirmed_phone: current_user.unconfirmed_phone) current_user.update(confirmed_phone: current_user.unconfirmed_phone)
ahoy.track :level_2_user, user_id: current_user.id ahoy.track(:level_2_user, user_id: current_user.id) rescue nil
if VerifiedUser.phone?(current_user) if VerifiedUser.phone?(current_user)
current_user.update(verified_at: Time.now) current_user.update(verified_at: Time.now)