Polish the code

This commit is contained in:
Alex Sherman 2020-07-16 11:37:32 +05:00
parent c4de5655e1
commit 6c36296aaa
2 changed files with 0 additions and 5 deletions

View file

@ -12,8 +12,6 @@ class Contact < ApplicationRecord
belongs_to :registrar, required: true
has_many :domain_contacts
has_many :domains, through: :domain_contacts
has_many :admin_domains, -> { merge(DomainContact.admin) }, source: :domain,
through: :domain_contacts
has_many :legal_documents, as: :documentable
has_many :registrant_domains, class_name: 'Domain', foreign_key: 'registrant_id'
has_many :actions, dependent: :destroy
@ -264,7 +262,6 @@ class Contact < ApplicationRecord
def registrant_user_company_contacts(registrant_user)
ident = registrant_user.companies.collect(&:registration_number)
# ident = ['12345678']
where(ident_type: ORG,
ident: ident,

View file

@ -6,8 +6,6 @@ class DomainContact < ApplicationRecord
belongs_to :contact
belongs_to :domain
scope :admin, -> { where(type: 'AdminDomainContact') }
attr_accessor :value_typeahead
self.ignored_columns = %w[legacy_domain_id legacy_contact_id]