Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Use RubyMoney with mongoid
Ruby

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
spec
.document
.gitignore
.rspec
Gemfile
Gemfile.lock
LICENSE.txt
README.rdoc
Rakefile
VERSION
mongoid_money_field.gemspec

README.rdoc

mongoid money field

This is a super simple gem to use RubyMoney money type columns with mongoid

github.com/RubyMoney/money github.com/mongoid/mongoid

Description

A simple gem that creates a Money datatype using RubyMoney for Mongoid.

Inspired by gist.github.com/840500

Installation

Include the gem in your Gemfile

gem 'mongoid_money_field'

Usage

class DummyMoney
  include Mongoid::Document
  include Mongoid::MoneyField

  field :description

  money_field :price

end

All Money values are converted and stored in mongo as cents and currency in two separate fields.

Copyright

Copyright © 2012 glebtv. MIT License.

Something went wrong with that request. Please try again.