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

@ -39,7 +39,7 @@ class Registrar < ApplicationRecord
alias_attribute :contact_email, :email
WHOIS_TRIGGERS = %w(name email phone street city state zip)
WHOIS_TRIGGERS = %w[name email phone street city state zip].freeze
after_commit :update_whois_records
def update_whois_records

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)