Permalink
Browse files

Fixed typo in ActiveRecord aggregations documentation.

  • Loading branch information...
1 parent 4a9ddde commit 93a49c33cc0d35b7ee6ed2e0ff7caadd5a3e2e0f @dasch dasch committed Sep 14, 2008
Showing with 2 additions and 2 deletions.
  1. +2 −2 activerecord/lib/active_record/aggregations.rb
@@ -75,7 +75,7 @@ def clear_aggregation_cache #:nodoc:
#
# customer.balance = Money.new(20) # sets the Money value object and the attribute
# customer.balance # => Money value object
- # customer.balance.exchanged_to("DKK") # => Money.new(120, "DKK")
+ # customer.balance.exchange_to("DKK") # => Money.new(120, "DKK")
# customer.balance > Money.new(10) # => true
# customer.balance == Money.new(20) # => true
# customer.balance < Money.new(5) # => false
@@ -99,7 +99,7 @@ def clear_aggregation_cache #:nodoc:
# relational unique identifiers (such as primary keys). Normal ActiveRecord::Base classes are entity objects.
#
# It's also important to treat the value objects as immutable. Don't allow the Money object to have its amount changed after
- # creation. Create a new Money object with the new value instead. This is exemplified by the Money#exchanged_to method that
+ # creation. Create a new Money object with the new value instead. This is exemplified by the Money#exchange_to method that
# returns a new value object instead of changing its own values. Active Record won't persist value objects that have been
# changed through means other than the writer method.
#

0 comments on commit 93a49c3

Please sign in to comment.