未定义的方法'delete'为0:Fixnum大虾/栏

时间:2018-07-18 07:55:47

标签: ruby-on-rails prawn

我收到一个非常奇怪的错误。 undefined method `delete' for 0:Fixnum尝试设置行样式时。为什么会这样?

table(headers + Invoice.all.map do |invoice|
                [
                    make_cell(content: invoice.invoice_number),
                    make_cell(content: format_date(invoice.invoice_date)),
                    make_cell(content: format_date(invoice.due_date)),
                    make_cell(content: format_price(invoice.total)),
                    make_cell(content: format_price(invoice.fees_total)),
                    make_cell(content: format_price(invoice.actual_total))
                ]
      end, table_options, style(cell(0), padding: [4,2]))

0 个答案:

没有答案