From 48ab1c7c7e6426b7c1da34e8b766ce97f1f6d421 Mon Sep 17 00:00:00 2001 From: Matt Farnsworth Date: Mon, 14 Dec 2015 13:50:11 +0200 Subject: [PATCH] Story #105846070 - include results from business registry if found --- app/controllers/registrant/domains_controller.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/controllers/registrant/domains_controller.rb b/app/controllers/registrant/domains_controller.rb index ea84a6aa3..addc157e3 100644 --- a/app/controllers/registrant/domains_controller.rb +++ b/app/controllers/registrant/domains_controller.rb @@ -40,7 +40,13 @@ class Registrant::DomainsController < RegistrantController end def domains - current_user.domains + ident_cc, ident = @current_user.registrant_ident.split '-' + begin + BusinessRegistryCache.fetch_associated_domains ident, ident_cc + rescue Soap::Arireg::NotAvailableError => error + flash[:notice] = I18n.t(error.message[:message]) + current_user.domains + end end def normalize_search_parameters