mirror of
https://github.com/internetee/registry.git
synced 2025-07-23 03:06:14 +02:00
Merge pull request #932 from internetee/improve-registrant-area
Improve registrant area
This commit is contained in:
commit
64d8be029c
21 changed files with 246 additions and 84 deletions
|
@ -1,5 +1,6 @@
|
|||
class Registrant::ContactsController < RegistrantController
|
||||
helper_method :domain_ids
|
||||
helper_method :domain
|
||||
|
||||
def show
|
||||
@contact = Contact.where(id: contacts).find_by(id: params[:id])
|
||||
|
@ -25,4 +26,19 @@ class Registrant::ContactsController < RegistrantController
|
|||
BusinessRegistryCache.fetch_by_ident_and_cc(ident, ident_cc).associated_domain_ids
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def domain
|
||||
current_user_domains.find(params[:domain_id])
|
||||
end
|
||||
|
||||
def current_user_domains
|
||||
ident_cc, ident = current_registrant_user.registrant_ident.split '-'
|
||||
begin
|
||||
BusinessRegistryCache.fetch_associated_domains ident, ident_cc
|
||||
rescue Soap::Arireg::NotAvailableError => error
|
||||
flash[:notice] = I18n.t(error.json[:message])
|
||||
Rails.logger.fatal("[EXCEPTION] #{error.to_s}")
|
||||
current_registrant_user.domains
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue