Fix CC issues

This commit is contained in:
Karl Erik Õunapuu 2020-11-12 17:05:13 +02:00
parent 60a66bc540
commit 54eb1e91de
No known key found for this signature in database
GPG key ID: C9DD647298A34764
4 changed files with 78 additions and 47 deletions

View file

@ -1,4 +1,15 @@
class ApplicationMailer < ActionMailer::Base
append_view_path Rails.root.join('app', 'views', 'mailers')
layout 'mailer'
end
def registrant_confirm_url(domain:, method:)
token = domain.registrant_verification_token
base_url = ENV['registrant_portal_verifications_base_url']
url = registrant_domain_delete_confirm_url(domain, token: token) if method == 'delete'
url ||= registrant_domain_update_confirm_url(domain, token: token)
return url if base_url.blank?
"#{base_url}/confirms/#{domain.name_puny}/#{method}/#{token}"
end
end