0
我在使用寶石錢和錢軌的rails 3.2.6
應用程序。錢軌設置自定義貨幣
爲了錢護欄我已經設置了一個初始化與此數據:
MoneyRails.configure do |config|
config.default_currency = :eur
config.register_currency = {
:id => :euc,
:priority => 1,
:iso_code => "EUR",
:name => "Euro with Comma decimal mark",
:symbol => "€",
:symbol_first => true,
:subunit => "Cent",
:subunit_to_unit => 100,
:thousands_separator => ".",
:decimal_mark => ","
}
end
注意我創建了一個新的貨幣:EUC,因爲我想用逗號小數點分隔符,顯示歐元貨幣,
,但問題是錢對象尚未顯示逗號,例如:
amount = Money.new(100, 'EUR')
amount.to_s
或在視圖中:
<%= humanized_money amount %>
it display "1.00 instead of "1,00"
我在哪裏做錯了?