Browse Source

update

pull/1/head
Nicolae Claudius 13 years ago
parent
commit
e4b2aa71ba
  1. 1
      app/controllers/domains_controller.rb
  2. 4
      app/controllers/ns_controller.rb
  3. 2
      app/controllers/soas_controller.rb
  4. 4
      app/models/domain.rb

1
app/controllers/domains_controller.rb

@ -15,6 +15,7 @@ class DomainsController < ApplicationController
def do_new
super
session[:sample_ns] = nil
@record.setup(current_user.email, sample_ns)
end

4
app/controllers/ns_controller.rb

@ -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
end

2
app/controllers/soas_controller.rb

@ -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
end

4
app/models/domain.rb

@ -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
end
end

Loading…
Cancel
Save