RubyMoney/money-rails — pull request #19 by Katen (2012-06-25 13:24:10+00:00)
Title: Mongoid 2 Support

This commit allows users to use `Money` as a field type for Mongoid 2.x. The following can be done :

```ruby
class Priceable
include Mongoid::Document

field :price, type: Money
end

obj = Priceable.new
# => #

obj.price
# => nil

obj.price = Money.new(100, 'EUR')
# => #

obj.price
#=> #

obj.save
# => true

obj
# => #100, :currency_iso=>"EUR"}>

obj.price
#=> #
```

There is no test at the moment because I don't know how to setup the test chain for mongoid. So I leave this part to you, unless you can tell how to do it. :)