Fix outdated pdf rendering

This commit is contained in:
Alex Sherman 2021-05-03 16:53:41 +05:00
parent c613de1a11
commit 1c767d0364

View file

@ -14,9 +14,7 @@ class Invoice
private
def invoice_html
view = ActionView::Base.new(ActionController::Base.view_paths, invoice: invoice)
view.class_eval { include ApplicationHelper }
view.render(file: 'invoice/pdf', layout: false)
ApplicationController.render(template: 'invoice/pdf', assigns: { invoice: invoice } )
end
end
end