Sha256: 92befa33b34239c875a4708c2ebaae728f7d149c3ff77d973f1364dadb9d3f43

Contents?: true

Size: 466 Bytes

Versions: 1

Compression:

Stored size: 466 Bytes

Contents

Ruport::Formatter::WickedPDF.class_eval do
  def finalize_table
    # TODO would be great to eliminate this hack
    
    # I think the reason the helper doesn't work is because of the pdf_from_string call vs the standard render :pdf
    # <%= wicked_pdf_stylesheet_link_tag "pdf" %>

    output.replace(WickedPdf.new.pdf_from_string("<style>" + Rails.application.assets.find_asset("pdf").body + "</style>" + output,
      :print_media_type => false
    ))
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
spree_advanced_reporting-2.1.0 app/models/ruport/formatter/wicked_pdf_decorator.rb