Html 当:align=>;时出现未定义的方法错误;虾表中的{0=>;:left,1=>;:right}已设置

Html 当:align=>;时出现未定义的方法错误;虾表中的{0=>;:left,1=>;:right}已设置,html,prawn,Html,Prawn,每当我在虾表中设置:align=>{0=>:left,1=>:right}时,我就会收到此错误: nil:NilClass的未定义方法“+” 我的表格设置如下: conds = [[{:content => "<b><font size='20'>Condensers</font></b>", :colspan => 2}], [ "Model #", "Price"]] conds += @customer.condensers.ma

每当我在虾表中设置
:align=>{0=>:left,1=>:right}
时,我就会收到此错误:


nil:NilClass的未定义方法“+”

我的表格设置如下:

conds = [[{:content => "<b><font size='20'>Condensers</font></b>", :colspan => 2}], [ "Model #", "Price"]]
conds += @customer.condensers.map do |condenser|
[
condenser.model_number,
number_to_currency(condenser.price / 0.55)
]
end
pdf.table conds,
row_colors: ["FFFFFF","d8edff"],
:header => true,
:width => 300,
:cell_style => { :inline_format => true, :rotate => 0, :overflow => :shrink_to_fit, :min_font_size => 8, :align => {0 => :left, 1 => :right} }
conds=[[{:content=>“concerrs”、:colspan=>2}]、“Model#”、“Price”]]
conds+=@customer.concerrs.map do| concerter|
[
冷凝器型号,
编号到货币(冷凝器价格/0.55)
]
结束
pdf.1表格conds,
行颜色:[“FFFFFF”,“d8edff”],
:header=>true,
:宽度=>300,
:cell_style=>{:inline_format=>true,:rotate=>0,:overflow=>:shorn_to_fit,:min_font_size=>8,:align=>{0=>:left,1=>:right}

我从一篇文章中找到了一个答案,这个答案非常有效

pdf.table(conds) do
  style(column(1), align: :right)
end

错误消息是什么?nil:nilclass的未定义方法“+”给出回溯和行号../home/ubuntu/workspace/app/views/customers/show.pdf.prawn其中第22行出现:nil:nilclass的未定义方法“+”这是第22行pdf.table conds