From 133dc3b6d0d270fff4a728c8f9f717b6d209b599 Mon Sep 17 00:00:00 2001 From: Bogdan Date: Mon, 29 Jan 2018 11:17:35 +0200 Subject: Fix the example of 'finding records by a value object' (#31818) This example was added in abdf546ad6d02ecb95766e73cd3c645a48c954de but was inconsistent with `composed_of :balance` definition in the 'Customer'. [Ryuta Kamizono & bogdanvlviv] [ci skip] --- activerecord/lib/active_record/aggregations.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'activerecord') diff --git a/activerecord/lib/active_record/aggregations.rb b/activerecord/lib/active_record/aggregations.rb index a808a8a1ce..27a641f05b 100644 --- a/activerecord/lib/active_record/aggregations.rb +++ b/activerecord/lib/active_record/aggregations.rb @@ -177,9 +177,9 @@ module ActiveRecord # # Once a #composed_of relationship is specified for a model, records can be loaded from the database # by specifying an instance of the value object in the conditions hash. The following example - # finds all customers with +balance_amount+ equal to 20 and +balance_currency+ equal to "USD": + # finds all customers with +address_street+ equal to "May Street" and +address_city+ equal to "Chicago": # - # Customer.where(balance: Money.new(20, "USD")) + # Customer.where(address: Address.new("May Street", "Chicago")) # module ClassMethods # Adds reader and writer methods for manipulating a value object: -- cgit v1.2.3