Class: Dradis::Plugins::PdfExport::ReportsController

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

Instance Method Summary collapse

Instance Method Details

#createObject

This method cycles throw the notes in the reporting category and creates a simple PDF report with them.



9
10
11
12
13
14
15
16
# File 'app/controllers/dradis/plugins/pdf_export/reports_controller.rb', line 9

def create
  exporter = Dradis::Plugins::PdfExport::Exporter.new(export_params)
  pdf = exporter.export

  send_data pdf.render, filename: "dradis_report-#{Time.now.to_i}.pdf",
                        type: 'application/pdf',
                        disposition: 'inline'
end