You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
class RecordsController < ApplicationController
|
|
|
|
active_scaffold :record do |conf|
|
|
|
|
conf.sti_children = [:SOA, :NS]
|
|
|
|
conf.columns = [:name, :type, :content, :ttl, :prio, :change_date]
|
|
|
|
conf.actions.exclude :show
|
|
|
|
end
|
|
|
|
before_filter :ensure_nested_under_domain
|
|
|
|
|
|
|
|
protected
|
|
|
|
|
|
|
|
def beginning_of_chain
|
|
|
|
super.readonly(false)
|
|
|
|
end
|
|
|
|
|
|
|
|
def ensure_nested_under_domain
|
|
|
|
raise CanCan::AccessDenied, "not found" unless nested? and nested_parent_record.is_a?(Domain)
|
|
|
|
end
|
|
|
|
end
|