Browse Source

subdomain logic

pull/1/head
Nicolae Claudius 13 years ago
parent
commit
6c9177020d
  1. 10
      app/controllers/ns_controller.rb

10
app/controllers/ns_controller.rb

@ -1,8 +1,8 @@
class NsController < ApplicationController class NsController < ApplicationController
active_scaffold :ns do |conf| active_scaffold :ns do |conf|
conf.list.columns = [:name, :type, :content, :ttl, :prio, :change_date] conf.list.columns = [:name, :type, :content, :ttl, :prio, :change_date]
conf.create.columns = [:content, :ttl] conf.create.columns = [:name, :content, :ttl]
conf.update.columns = [:content, :ttl] conf.update.columns = [:name, :content, :ttl]
conf.columns[:content].label = 'NS' conf.columns[:content].label = 'NS'
conf.columns[:change_date].list_ui = :timestamp conf.columns[:change_date].list_ui = :timestamp
conf.actions.exclude :show conf.actions.exclude :show
@ -22,8 +22,10 @@ class NsController < ApplicationController
# override, we make our own sti logic # override, we make our own sti logic
def new_model def new_model
model = beginning_of_chain model = beginning_of_chain.new
model.new model.name = nested_parent_record.name
model.content = Settings.ns.sample
model
end end
# override to close create form after success # override to close create form after success

Loading…
Cancel
Save