2022/01/25銀座Rails#41で発表したスライドです。 https://ginza-rails.connpass.com/event/234304/
The ability to download data in pdf format is a common requirement that you will encounter when building web applications. There are different ways that this can be achieved in Rails. We are going to look at the two major ways used to generate pdf documents: with Ruby using a DSL for defining and styling the documents, or by using a library that will convert your HTML to PDF. There are three popul
pdf.text "Order ##{@order.id}", :size => 30, :style => :bold pdf.move_down(30) items = @order.cart.line_items.map do |item| [ item.product.name, item.quantity, number_to_currency(item.unit_price), number_to_currency(item.full_price) ] end pdf.table items, :border_style => :grid, :row_colors => ["FFFFFF","DDDDDD"], :headers => ["Product", "Qty", "Unit Price", "Full Price"], :align => { 0 => :left,
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く