mirror of
https://github.com/internetee/registry.git
synced 2025-08-13 13:09:32 +02:00
Get rid of outdated rendering
This commit is contained in:
parent
4554975fad
commit
156ca0b54f
1 changed files with 5 additions and 3 deletions
|
@ -43,9 +43,11 @@ class Registrar
|
||||||
send_data raw_csv, filename: 'contacts.csv', type: "#{Mime[:csv]}; charset=utf-8"
|
send_data raw_csv, filename: 'contacts.csv', type: "#{Mime[:csv]}; charset=utf-8"
|
||||||
end
|
end
|
||||||
format.pdf do
|
format.pdf do
|
||||||
view = ActionView::Base.new(ActionController::Base.view_paths, contacts: contacts)
|
raw_html = ApplicationController.render(
|
||||||
view.class_eval { include ::ApplicationHelper }
|
template: 'registrar/contacts/list_pdf',
|
||||||
raw_html = view.render(file: 'registrar/contacts/list_pdf', layout: false)
|
assigns: { contacts: contacts },
|
||||||
|
formats: [:html]
|
||||||
|
)
|
||||||
raw_pdf = contacts.pdf(raw_html)
|
raw_pdf = contacts.pdf(raw_html)
|
||||||
|
|
||||||
send_data raw_pdf, filename: 'contacts.pdf'
|
send_data raw_pdf, filename: 'contacts.pdf'
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue