Class: Dradis::Plugins::Projects::TemplatesController

Inherits:
Export::BaseController
  • Object
show all
Defined in:
app/controllers/dradis/plugins/projects/templates_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject



6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'app/controllers/dradis/plugins/projects/templates_controller.rb', line 6

def create
  # this allows us to have different exporters in different editions
  exporter_class = Rails.application.config.dradis.projects.template_exporter

  options  = export_params.merge(
    plugin: Dradis::Plugins::Projects,
    scope: :all
  )
  exporter = exporter_class.new(options)
  template = exporter.export

  send_data(template, filename: 'dradis-template.xml', type: :xml)
end