Added invoice recipient validation

This commit is contained in:
Sergei Tsõganov 2022-06-20 16:22:18 +03:00
parent de5872fb40
commit 885206d075
3 changed files with 11 additions and 2 deletions

View file

@ -13,7 +13,7 @@ class User < ApplicationRecord
def self.from_omniauth(omniauth_hash)
uid = omniauth_hash['uid']
identity_code = uid.slice(2..-1)
identity_code = uid&.slice(2..-1)
# country_code = uid.slice(0..1)
find_by(identity_code: identity_code, active: true)