From b694f0c2f643d2d61d65927b5b1b72c1e1790129 Mon Sep 17 00:00:00 2001 From: Artur Beljajev Date: Sat, 31 Mar 2018 12:00:19 +0300 Subject: [PATCH] Remove unused methods --- app/models/domain.rb | 11 ----------- app/models/epp/domain.rb | 10 ---------- app/models/registrar.rb | 5 ----- app/models/whois_record.rb | 14 -------------- 4 files changed, 40 deletions(-) diff --git a/app/models/domain.rb b/app/models/domain.rb index 9eef0f30f..bb671dc2d 100644 --- a/app/models/domain.rb +++ b/app/models/domain.rb @@ -220,17 +220,6 @@ class Domain < ActiveRecord::Base end class << self - def included - includes( - :registrant, - :registrar, - :nameservers, - :whois_record, - { tech_contacts: :registrar }, - { admin_contacts: :registrar } - ) - end - def nameserver_required? Setting.nameserver_required end diff --git a/app/models/epp/domain.rb b/app/models/epp/domain.rb index fb01fe38a..43ad15bc7 100644 --- a/app/models/epp/domain.rb +++ b/app/models/epp/domain.rb @@ -38,16 +38,6 @@ class Epp::Domain < Domain ok end - before_save :link_contacts - def link_contacts - #TODO: cleanup cache if we think to cache dynamic statuses - end - - after_destroy :unlink_contacts - def unlink_contacts - #TODO: cleanup cache if we think to cache dynamic statuses - end - class << self def new_from_epp(frame, current_user) domain = Epp::Domain.new diff --git a/app/models/registrar.rb b/app/models/registrar.rb index 5fd0008b5..525415cbe 100644 --- a/app/models/registrar.rb +++ b/app/models/registrar.rb @@ -105,11 +105,6 @@ class Registrar < ActiveRecord::Base cash_account.account_activities.create!(args) end - def credit!(args) - args[:currency] = 'EUR' - cash_account.account_activities.create!(args) - end - def address [street, city, state, zip].reject(&:blank?).compact.join(', ') end diff --git a/app/models/whois_record.rb b/app/models/whois_record.rb index bd16e0c99..e0ea4253d 100644 --- a/app/models/whois_record.rb +++ b/app/models/whois_record.rb @@ -9,20 +9,6 @@ class WhoisRecord < ActiveRecord::Base after_save :update_whois_server after_destroy :destroy_whois_record - class << self - def included - includes( - domain: [ - :registrant, - :registrar, - :nameservers, - { tech_contacts: :registrar }, - { admin_contacts: :registrar } - ] - ) - end - end - def self.find_by_name(name) WhoisRecord.where("lower(name) = ?", name.downcase) end