diff --git a/lib/wicked_pdf/pdf_helper.rb b/lib/wicked_pdf/pdf_helper.rb index bc0ac7c5..19b11752 100644 --- a/lib/wicked_pdf/pdf_helper.rb +++ b/lib/wicked_pdf/pdf_helper.rb @@ -78,7 +78,7 @@ def make_pdf(options = {}) def make_and_send_pdf(pdf_name, options = {}) options[:wkhtmltopdf] ||= nil options[:layout] ||= false - options[:template] ||= File.join(controller_path, action_name) + options[:template] ||= lookup_context.find(action_name, _prefixes, false).virtual_path options[:disposition] ||= 'inline' if options[:show_as_html] render_opts = {