RubyMoney/money — Issue #119: Incorrect conversion from string to money
Author: chezka
Created: 2011-11-17 14:33:12+00:00
State: open

before

~/development/project % cat Gemfile.lock| grep money
money (4.0.1)
~/development/daytoday % rails --version
Rails 3.0.10

initializers/money.rb
Money::Currency::TABLE[:kzm] = {
:priority => 1,
:iso_code => 'KZM',
:iso_numeric => nil,
:name => 'КЦ',
:symbol => 'кц',
:subunit => 'чатл',
:subunit_to_unit => 4400,
:separator => '.',
:delimiter => ','
}

then

~/development/project % rails c
Loading development environment (Rails 3.0.10)
ruby-1.8.7-p352 :001 > m = '1.5'.to_money(:kzm)
=> #
ruby-1.8.7-p352 :002 > m = '.5'.to_money(:kzm)
=> #
ruby-1.8.7-p352 :003 > m = '0.5'.to_money(:kzm)
=> #