Skip to content

Commit

Permalink
fix file structs
Browse files Browse the repository at this point in the history
  • Loading branch information
qinmingyuan committed Dec 1, 2023
1 parent e135ecf commit ce212ce
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/exporters/datum/pdf_exporter.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require 'prawn/table'
module Datum
class PdfExporter
class PdfExporter < CacheExporter

def pdf
if reportable.respond_to?(:pdf_object)
Expand Down
5 changes: 5 additions & 0 deletions app/models/datum/model/table_list.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ def convert_parameters
params
end

def to_pdf
export = PdfExporter.new(self)
export.run
end

def direct_xlsx
export = XlsxExporter.new(export: self.data_list.export, params: self.parameters)
export.run
Expand Down

0 comments on commit ce212ce

Please sign in to comment.