2015-11-05 50 views

回答

0

強制編碼前先轉換爲字符串。試試以下代碼:

<% product_prices = [] %> 
<% product.product_prices.collect{|product_price| product_prices << number_to_currency(product_price.price.to_f, :unit => "£").to_s.force_encoding(Encoding::UTF_8)} %> 
+0

已經使用,但沒有幫助它。任何其他? – user1780370

+0

您是否嘗試將'.each'更改爲'.collect'?你是否用'<% %>'分隔了每行。我更新了上面的代碼。 – 2015-11-05 13:04:50

+0

我試過但沒有任何變化.. – user1780370

相關問題