RubyMoney / money-rails

Integration of RubyMoney - Money with Rails
MIT License
1.8k stars 387 forks source link

exchange_rates #10

Closed ep-wac closed 10 years ago

ep-wac commented 12 years ago

This ticket turned into something I had not anticipated when I wrote 'in a sec' in the other ticket <:)

So - to spare you all my ramblings - I'll cut to the chase :)

exchange_rates could be implemented in a table and the bank (nordea gem eg.) could update_rates and be tweaked to save rates to this table

converting amounts using these exchange_rates would require us to open either the bank or the Money class and add methods to them in order to do something like

exchange_with_rate(currency, rate)

with rate being either :sell, :buy, :middle or perhaps nil (using the default exchange_to method) or perhaps a String '1.12314' or a Float 1.12314

barmstrong commented 12 years ago

Came here to ask the same thing...an exchange rate could be represented as a Money object, but by default it's not storing enough significant digits.

I don't want to redefine USD in general to store more significant digits, just a USD exchange rate. Has anyone solved this? Thanks!

semmons99 commented 10 years ago

no activity, closing