scinote-web/config/initializers/wicked_pdf.rb

10 lines
276 B
Ruby
Raw Normal View History

# frozen_string_literal: true
2016-07-21 19:11:15 +08:00
WickedPdf.config ||= {}
2016-02-12 23:52:43 +08:00
ENV['PATH'].split(':').each do |path|
exe_path = File.join(path, 'wkhtmltopdf')
WickedPdf.config[:exe_path] = File.join(path, 'wkhtmltopdf') if File.file?(exe_path)
WickedPdf.config[:allow] = Rails.public_path
end