README.rdoc in nofxx-money-2.3.1 vs README.rdoc in nofxx-money-2.3.2

- old
+ new

@@ -20,11 +20,11 @@ == Download Install stable releases with the following command: - gem install nofxx-money + gem install money The development version (hosted on Github) can be installed with: gem sources -a http://gems.github.com gem install nofxx-money @@ -40,12 +40,15 @@ money = Money.new(1000, "USD") money.cents # => 1000 money.currency # => "USD" money.format # => "$10.00" + Money.new(880088, "EUR").format # => €8,800.88 + Money.new(-8000).format(:no_cents => true) # => $-80 + Money.new(1000, "USD") == Money.new(1000, "USD") # => true - Money.new(1000, "USD") == Money.new(100, "USD") # => false + Money.new(1000, "USD") == Money.new( 100, "USD") # => false Money.new(1000, "USD") == Money.new(1000, "EUR") # => false === Currency Exchange @@ -78,13 +81,13 @@ Money.default_bank = ExchangeBankWhichScrapesXeDotCom.new === Ruby on Rails -Use the +has_many+ helper to embed the money object in your models. -The following example requires a +price_in_cents+ and a +price_currency+ -fields. +Use the +has_money+ method to embed the money object in your models. +The following example requires a +price_cents+ and a +price_currency+ +fields on the database. config/enviroment.rb require.gem 'nofxx-money', :lib => 'money' @@ -105,10 +108,10 @@ end === Default Currency -By default Money defaults to USD as its currency. This can be overwritten using +By default Money defaults to USD as its currency. This can be overwritten using: Money.default_currency = "CAD" If you use Rails, then environment.rb is a very good place to put this.