lib/exchange/money.rb in exchange-1.1.0 vs lib/exchange/money.rb in exchange-1.1.1
- old
+ new
@@ -84,10 +84,10 @@
# Exchange::Money.new(40,:nok).to(:sek, :at => Time.gm(2012,2,2))
#
def to other, options={}
other = ISO.assert_currency!(other)
- if api_supports_currency?(other) && api_supports_currency?(currency)
+ if api_supports_currency?(currency) && api_supports_currency?(other)
opts = { :at => time, :from => self }.merge(options)
Money.new(api.new.convert(value, currency, other, opts), other, opts)
elsif fallback!
to other, options
else