Basic zonefile generating

This commit is contained in:
Martin Lensment 2014-11-11 17:00:50 +02:00
parent 5754bbe297
commit 34410a8ed5
6 changed files with 192 additions and 2 deletions

View file

@ -1,5 +1,5 @@
class Admin::DomainsController < AdminController
before_action :set_domain, only: [:show, :edit, :update]
before_action :set_domain, only: [:show, :edit, :update, :zonefile]
def index
@q = Domain.includes(:registrar, :owner_contact).search(params[:q])
@ -27,6 +27,11 @@ class Admin::DomainsController < AdminController
end
end
def zonefile
@zonefile = @domain.generate_zonefile
# send_data @zonefile, filename: 'bla.txt'
end
private
def set_domain