internetee-registry/app/controllers/admin/zonefiles_controller.rb
2014-11-21 15:30:40 +02:00

8 lines
311 B
Ruby

class Admin::ZonefilesController < ApplicationController
# TODO: Refactor this
# rubocop:disable Metrics/MethodLength
def index
@zonefile = ActiveRecord::Base.connection.execute("select generate_zonefile('ee')")[0]['generate_zonefile']
send_data @zonefile, filename: 'zonefile-1000.txt'
end
end