RubyMoney/money-rails — pull request #115 by mirosr (2013-07-01 16:11:44+00:00)
Title: Model with no default currency

I noticed an issue with the way money-rails handles attribute currency when no instance nor model default currency is set. In this case it should get and set *_currency* attribute not the global default.

Let me illustrate it with an example:
```ruby
MoneyRails.configure do |config|

# To set the default currency
#
config.default_currency = :eur
end

class PaymentTransaction < ActiveRecord::Base
attr_accessible :amount_cents, :amount_currency, :tax_cents, :tax_currency, :amount, :tax

monetize :amount_cents
monetize :tax_cents

monetize :total_cents
def total_cents
return amount_cents + tax_cents
end
end

payment_transaction = PaymentTransaction.create(
amount: Money.new(3210, 'GBP'),
tax: Money.new(5, 'CHF'))

payment_transaction.amount_cents.should == 3210
payment_transaction.amount_currency.should == 'GBP'
payment_transaction.tax_cents.should == 5
payment_transaction.tax_currency.should == 'CHF'
```