Class: Dradis::Plugins::Projects::PackagesController

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

Instance Method Summary collapse

Instance Method Details

#createObject



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

def create
  filename = Rails.root.join('tmp', 'dradis-export.zip')

  options = export_params.merge({
    plugin: Dradis::Plugins::Projects,
    scope: :all
  })
  exporter = Dradis::Plugins::Projects::Export::Package.new(options)
  template = exporter.export(filename: filename)

  send_file(filename)
end