Renamed owner_contact to registrant

This commit is contained in:
Priit Tark 2015-04-16 12:23:06 +03:00
parent 92f41ebe0b
commit 8cd3dcf551
21 changed files with 126 additions and 812 deletions

View file

@ -74,7 +74,7 @@ class Contact < ActiveRecord::Base
def find_orphans
Contact.where('
NOT EXISTS(
select 1 from domains d where d.owner_contact_id = contacts.id
select 1 from domains d where d.registrant_id = contacts.id
) AND NOT EXISTS(
select 1 from domain_contacts dc where dc.contact_id = contacts.id
)
@ -138,7 +138,7 @@ class Contact < ActiveRecord::Base
# Find a way to use self.domains with contact
def domains_owned
Domain.where(owner_contact_id: id)
Domain.where(registrant_id: id)
end
def relations_with_domain?