From e1f799a42f569990c3d9512bafe85898454c10a6 Mon Sep 17 00:00:00 2001 From: Noah Hendrix Date: Fri, 24 Feb 2012 13:55:24 -0600 Subject: Fixed typo in composed_of example with Money#<=>, was comparing amount itself instead of other_money.amount --- activerecord/lib/active_record/aggregations.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activerecord') diff --git a/activerecord/lib/active_record/aggregations.rb b/activerecord/lib/active_record/aggregations.rb index 5a8addc4e4..c39284539c 100644 --- a/activerecord/lib/active_record/aggregations.rb +++ b/activerecord/lib/active_record/aggregations.rb @@ -46,7 +46,7 @@ module ActiveRecord # # def <=>(other_money) # if currency == other_money.currency - # amount <=> amount + # amount <=> other_money.amount # else # amount <=> other_money.exchange_to(currency).amount # end -- cgit v1.2.3