Sha256: ed2716a5ca0cbf1831eb7b1ddb9056bc7275c5c915b28530c267606ca19d368f

Contents?: true

Size: 655 Bytes

Versions: 4

Compression:

Stored size: 655 Bytes

Contents

module Dradis
  module Plugins
    module PdfExport
      class ReportsController < Dradis::Plugins::Export::BaseController
        skip_before_action :validate_template

        # This method cycles throw the notes in the reporting category and creates
        # a simple PDF report with them.
        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
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
dradis-pdf_export-4.14.0 app/controllers/dradis/plugins/pdf_export/reports_controller.rb
dradis-pdf_export-4.13.0 app/controllers/dradis/plugins/pdf_export/reports_controller.rb
dradis-pdf_export-4.11.0 app/controllers/dradis/plugins/pdf_export/reports_controller.rb
dradis-pdf_export-4.10.0 app/controllers/dradis/plugins/pdf_export/reports_controller.rb