mirror of
https://github.com/internetee/registry.git
synced 2025-07-21 18:26:06 +02:00
Story#105842700 - registrant cannot see other contact domains (legacy from FRED)
This commit is contained in:
parent
1bf7315a91
commit
51a0449799
3 changed files with 16 additions and 6 deletions
|
@ -415,7 +415,10 @@ class Contact < ActiveRecord::Base
|
|||
|
||||
|
||||
# fetch domains
|
||||
domains = Domain.where("domains.id IN (#{filter_sql})").includes(:registrar).page(page).per(per)
|
||||
domains = Domain.where("domains.id IN (#{filter_sql})")
|
||||
domains = domains.where("domains.id" => params[:leave_domains]) if params[:leave_domains]
|
||||
domains = domains.includes(:registrar).page(page).per(per)
|
||||
|
||||
if sorts.first == "registrar_name".freeze
|
||||
# using small rails hack to generate outer join
|
||||
domains = domains.includes(:registrar).where.not(registrars: {id: nil}).order("registrars.name #{order} NULLS LAST")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue