diff --git a/app/controllers/aaaas_controller.rb b/app/controllers/aaaas_controller.rb index dd224c4..2b792f6 100644 --- a/app/controllers/aaaas_controller.rb +++ b/app/controllers/aaaas_controller.rb @@ -15,7 +15,7 @@ class AaaasController < ApplicationController # override to use :mx_records instead of :records assoc def beginning_of_chain - nested_via_records? ? nested.parent_scope.aaaa_records : super + (nested_via_records? ? nested.parent_scope.aaaa_records : super).readonly(false) end # override, we make our own sti logic diff --git a/app/controllers/as_controller.rb b/app/controllers/as_controller.rb index 5557496..66be7cb 100644 --- a/app/controllers/as_controller.rb +++ b/app/controllers/as_controller.rb @@ -15,7 +15,7 @@ class AsController < ApplicationController # override to use :mx_records instead of :records assoc def beginning_of_chain - nested_via_records? ? nested.parent_scope.a_records : super + (nested_via_records? ? nested.parent_scope.a_records : super).readonly(false) end # override, we make our own sti logic diff --git a/app/controllers/cnames_controller.rb b/app/controllers/cnames_controller.rb index c3c6cb6..cd6d5e6 100644 --- a/app/controllers/cnames_controller.rb +++ b/app/controllers/cnames_controller.rb @@ -16,7 +16,7 @@ class CnamesController < ApplicationController # override to use :mx_records instead of :records assoc def beginning_of_chain - nested_via_records? ? nested.parent_scope.cname_records : super + (nested_via_records? ? nested.parent_scope.cname_records : super).readonly(false) end # override, we make our own sti logic diff --git a/app/controllers/domains_controller.rb b/app/controllers/domains_controller.rb index 71ee068..9606197 100644 --- a/app/controllers/domains_controller.rb +++ b/app/controllers/domains_controller.rb @@ -1,5 +1,4 @@ -class DomainsController < ApplicationController - +class DomainsController < ApplicationController active_scaffold :domain do |conf| conf.columns = [:name, :ip, :records, :soa_record, :ns_records] conf.list.columns = [:name, :records, :permissions] diff --git a/app/controllers/mxes_controller.rb b/app/controllers/mxes_controller.rb index 10a6ce3..34ebe1c 100644 --- a/app/controllers/mxes_controller.rb +++ b/app/controllers/mxes_controller.rb @@ -23,7 +23,7 @@ class MxesController < ApplicationController # override to use :mx_records instead of :records assoc def beginning_of_chain - nested_via_records? ? nested.parent_scope.mx_records : super + (nested_via_records? ? nested.parent_scope.mx_records : super).readonly(false) end # override, we make our own sti logic diff --git a/app/controllers/ns_controller.rb b/app/controllers/ns_controller.rb index aa1247d..603bc91 100644 --- a/app/controllers/ns_controller.rb +++ b/app/controllers/ns_controller.rb @@ -15,7 +15,7 @@ class NsController < ApplicationController # override to use :mx_records instead of :records assoc def beginning_of_chain - nested_via_records? ? nested.parent_scope.ns_records : super + (nested_via_records? ? nested.parent_scope.ns_records : super).readonly(false) end # override, we make our own sti logic diff --git a/app/controllers/srvs_controller.rb b/app/controllers/srvs_controller.rb index b9bd901..4d0b6a0 100644 --- a/app/controllers/srvs_controller.rb +++ b/app/controllers/srvs_controller.rb @@ -20,7 +20,7 @@ class SrvsController < ApplicationController # override to use :mx_records instead of :records assoc def beginning_of_chain - nested_via_records? ? nested.parent_scope.srv_records : super + (nested_via_records? ? nested.parent_scope.srv_records : super).readonly(false) end # override, we make our own sti logic diff --git a/app/controllers/txts_controller.rb b/app/controllers/txts_controller.rb index f54011b..9643d92 100644 --- a/app/controllers/txts_controller.rb +++ b/app/controllers/txts_controller.rb @@ -15,7 +15,7 @@ class TxtsController < ApplicationController # override to use :mx_records instead of :records assoc def beginning_of_chain - nested_via_records? ? nested.parent_scope.txt_records : super + (nested_via_records? ? nested.parent_scope.txt_records : super).readonly(false) end # override, we make our own sti logic