mirror of
https://github.com/internetee/registry.git
synced 2025-06-07 05:05:45 +02:00
Provide full Contact object to all_domains() instead of just id
This commit is contained in:
parent
e08f69a1cc
commit
f39fb1dc8b
2 changed files with 2 additions and 3 deletions
|
@ -6,7 +6,7 @@ class Registrant::ContactsController < RegistrantController
|
||||||
before_action :set_contact, only: [:show]
|
before_action :set_contact, only: [:show]
|
||||||
|
|
||||||
def show
|
def show
|
||||||
@requester_contact = Contact.find_by(ident: current_registrant_user.ident).id
|
@requester_contact = Contact.find_by(ident: current_registrant_user.ident)
|
||||||
authorize! :read, @contact
|
authorize! :read, @contact
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -451,9 +451,8 @@ class Contact < ApplicationRecord
|
||||||
end
|
end
|
||||||
|
|
||||||
def qualified_domain_name_list(requester, filter_sql)
|
def qualified_domain_name_list(requester, filter_sql)
|
||||||
return Domain.where('domains.id IN (?)', filter_sql) if requester.nil?
|
return Domain.where('domains.id IN (?)', filter_sql) unless requester.present?
|
||||||
|
|
||||||
requester = Contact.find_by(id: requester)
|
|
||||||
registrant_user = RegistrantUser.find_or_initialize_by(registrant_ident:
|
registrant_user = RegistrantUser.find_or_initialize_by(registrant_ident:
|
||||||
"#{requester.ident_country_code}-#{requester.ident}")
|
"#{requester.ident_country_code}-#{requester.ident}")
|
||||||
begin
|
begin
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue