diff options
author | Bogdan <bogdanvlviv@gmail.com> | 2018-01-29 11:17:35 +0200 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2018-01-29 18:17:35 +0900 |
commit | 133dc3b6d0d270fff4a728c8f9f717b6d209b599 (patch) | |
tree | 87028902dffc61980ffb2e0ab42a79f3989b725b /activerecord | |
parent | 798da629cea6094ffd0d43487991da628706a087 (diff) | |
download | rails-133dc3b6d0d270fff4a728c8f9f717b6d209b599.tar.gz rails-133dc3b6d0d270fff4a728c8f9f717b6d209b599.tar.bz2 rails-133dc3b6d0d270fff4a728c8f9f717b6d209b599.zip |
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]
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/aggregations.rb | 4 |
1 files changed, 2 insertions, 2 deletions
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: |