@ -15,6 +15,7 @@ class DomainsController < ApplicationController
def do_new
super
session[:sample_ns] = nil
@record.setup(current_user.email, sample_ns)
end
@ -1,7 +1,9 @@
class NsController < ApplicationController
active_scaffold :ns do |conf|
conf.columns = [:name, :content, :ttl]
conf.columns[:content].label = 'Hostname'
conf.create.columns = [:content, :ttl]
conf.update.columns = [:content, :ttl]
conf.columns[:content].label = 'NS'
conf.actions.exclude :show
@ -1,7 +1,7 @@
class SoasController < ApplicationController
active_scaffold :soa do |conf|
conf.columns = [:name, :primary_ns, :contact, :ttl]
conf.subform.columns = [:name, :primary_ns, :contact, :ttl]
conf.create.columns = [:primary_ns, :contact, :ttl]
conf.update.columns = [:contact, :ttl]
conf.actions.exclude :delete, :show
@ -41,11 +41,11 @@ class Domain < ActiveRecord::Base
soa.ttl ||= Settings.default_ttl
ns1.domain = self
ns1.name = sample_ns.first
ns1.content = sample_ns.first
ns1.ttl ||= Settings.default_ttl
ns2.domain = self
ns2.name = sample_ns.second
ns2.content = sample_ns.second
ns2.ttl ||= Settings.default_ttl