在正常形式中,我使用了这个:
<td>
<%= number_with_precision(approved_invoice.invoice_amount,
:precision =>2,
:delimiter => ",")
%>
</td>
这会在适当的位置添加逗号。如果我必须将此分隔符用于 best_in_place gem 怎么办:
<td class="tax-particulars-align">
<%= best_in_place @invoice, :invoice_amount,
:display_as => :get_invoice_amount_with_precision,
:type => :input
%>
</td>
如何在我的编辑页面中为金额字段添加逗号?有人可以帮助我吗?