Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #############################лоаут pdf.html.erb
- <!DOCTYPE html>
- <html>
- <head>
- <title>PDF</title>
- <%= wicked_pdf_stylesheet_link_tag "reporte" -%>
- </head>
- <body>
- <div class='container'>
- <%= yield %>
- </div>
- </body>
- </html>
- ###########################вюшка reporte.html.erb
- <body class="test_body">
- <table>
- <thead>
- <tr>
- <th>
- <span>Date</span>
- </th>
- </tr>
- <tr>
- <th>
- <span>Projects</span>
- </th>
- </tr>
- </thead>
- </table>
- </body>
- ########################контролер
- format.pdf { render template: 'reports/reporte.html.erb',
- pdf: "reports-#{Date.today}",
- layout: 'pdf',
- encoding: "UTF-8",
- all_users: @all_users }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement