diff --git a/app/models/domain.rb b/app/models/domain.rb index 48efa38..77df24f 100644 --- a/app/models/domain.rb +++ b/app/models/domain.rb @@ -13,7 +13,7 @@ class Domain < ActiveRecord::Base cattr_reader :types @@types = ['NATIVE', 'MASTER', 'SLAVE', 'SUPERSLAVE'] - has_one :soa_record, + has_one :soa_record, :class_name => 'SOA', :conditions => {:type => 'SOA'}, :inverse_of => :domain @@ -110,9 +110,11 @@ class Domain < ActiveRecord::Base soa.contact ||= email ns_records.build - ns_records.build - ns1, ns2 = ns_records + ns_records.build + ns_records.build + ns1, ns2, ns3 = ns_records ns1.content = Settings.ns.first - ns2.content = (Settings.ns - [ns1.content]).sample + ns2.content = Settings.ns.second + ns3.content = Settings.ns.third end end diff --git a/config/settings.sample.yml b/config/settings.sample.yml index a6eee31..1b36e26 100644 --- a/config/settings.sample.yml +++ b/config/settings.sample.yml @@ -3,7 +3,7 @@ min_ttl: 60 ns: - ns1.entrydns.net - ns2.entrydns.net -# - ns3.entrydns.net + - ns3.entrydns.net # - ns4.entrydns.net default_prio: 10 host_domains: