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"
我在哪里做错了?