registrar updates

This commit is contained in:
Priit Tark 2015-04-30 18:54:20 +03:00
parent 308666824f
commit 37b74d2086
3 changed files with 4 additions and 4 deletions

View file

@ -44,9 +44,8 @@ class Registrar < ActiveRecord::Base
after_save :update_whois_records
def update_whois_records
if changed? && (changes.keys & WHOIS_TRIGGERS).present?
whois_records.map(&:save) # slow currently
end
return true unless (changed? && (changes.keys & WHOIS_TRIGGERS).present?)
whois_records.map(&:save) # slow currently
end
class << self

View file

@ -1,5 +1,6 @@
class WhoisRecord < ActiveRecord::Base
belongs_to :domain
belongs_to :registrar
validates :domain, :name, :body, :json, presence: true