scinote-web/config/initializers/wicked_pdf.rb
2023-09-22 10:11:18 +02:00

9 lines
276 B
Ruby

# frozen_string_literal: true
WickedPdf.config ||= {}
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