mirror of
https://github.com/internetee/registry.git
synced 2025-06-06 04:37:30 +02:00
Polish the code
This commit is contained in:
parent
c4de5655e1
commit
6c36296aaa
2 changed files with 0 additions and 5 deletions
|
@ -12,8 +12,6 @@ class Contact < ApplicationRecord
|
||||||
belongs_to :registrar, required: true
|
belongs_to :registrar, required: true
|
||||||
has_many :domain_contacts
|
has_many :domain_contacts
|
||||||
has_many :domains, through: :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 :legal_documents, as: :documentable
|
||||||
has_many :registrant_domains, class_name: 'Domain', foreign_key: 'registrant_id'
|
has_many :registrant_domains, class_name: 'Domain', foreign_key: 'registrant_id'
|
||||||
has_many :actions, dependent: :destroy
|
has_many :actions, dependent: :destroy
|
||||||
|
@ -264,7 +262,6 @@ class Contact < ApplicationRecord
|
||||||
|
|
||||||
def registrant_user_company_contacts(registrant_user)
|
def registrant_user_company_contacts(registrant_user)
|
||||||
ident = registrant_user.companies.collect(&:registration_number)
|
ident = registrant_user.companies.collect(&:registration_number)
|
||||||
# ident = ['12345678']
|
|
||||||
|
|
||||||
where(ident_type: ORG,
|
where(ident_type: ORG,
|
||||||
ident: ident,
|
ident: ident,
|
||||||
|
|
|
@ -6,8 +6,6 @@ class DomainContact < ApplicationRecord
|
||||||
belongs_to :contact
|
belongs_to :contact
|
||||||
belongs_to :domain
|
belongs_to :domain
|
||||||
|
|
||||||
scope :admin, -> { where(type: 'AdminDomainContact') }
|
|
||||||
|
|
||||||
attr_accessor :value_typeahead
|
attr_accessor :value_typeahead
|
||||||
|
|
||||||
self.ignored_columns = %w[legacy_domain_id legacy_contact_id]
|
self.ignored_columns = %w[legacy_domain_id legacy_contact_id]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue