From a2f390aa0f08d8a4e96bdc0ad70956f1cc3dbb59 Mon Sep 17 00:00:00 2001 From: Stas Date: Wed, 27 Jan 2016 16:54:59 +0200 Subject: [PATCH] 105842700-contact_search_fix --- app/controllers/registrant/contacts_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/registrant/contacts_controller.rb b/app/controllers/registrant/contacts_controller.rb index 5ebf396ae..dfef2723a 100644 --- a/app/controllers/registrant/contacts_controller.rb +++ b/app/controllers/registrant/contacts_controller.rb @@ -1,7 +1,7 @@ class Registrant::ContactsController < RegistrantController def show - @contact = contacts.find(params[:id]) + @contact = Contact.where(id: contacts).find(params[:id]) authorize! :read, @contact end @@ -12,7 +12,7 @@ class Registrant::ContactsController < RegistrantController rescue Soap::Arireg::NotAvailableError => error flash[:notice] = I18n.t(error.json[:message]) Rails.logger.fatal("[EXCEPTION] #{error.to_s}") - Contact.none + [] end end end \ No newline at end of file