From c9822ace4c8961336527670e7eef59093f515dfd Mon Sep 17 00:00:00 2001 From: orekyuu Date: Fri, 26 Jan 2018 10:29:41 +0900 Subject: Fix not expanded problem when passing an Array object as argument to the where method using composed_of column. Fixes #31723 ``` david_balance = customers(:david).balance Customer.where(balance: [david_balance]).to_sql # Before: WHERE `customers`.`balance` = NULL # After : WHERE `customers`.`balance` = 50 ``` --- activerecord/CHANGELOG.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'activerecord/CHANGELOG.md') diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md index af77eaae0e..12d9a15e63 100644 --- a/activerecord/CHANGELOG.md +++ b/activerecord/CHANGELOG.md @@ -1,3 +1,17 @@ +* Fix not expanded problem when passing an Array object as argument to the where method using composed_of column. + + Fixes #31723 + + ``` + david_balance = customers(:david).balance + Customer.where(balance: [david_balance]).to_sql + + # Before: WHERE `customers`.`balance` = NULL + # After : WHERE `customers`.`balance` = 50 + ``` + + *Yutaro Kanagawa* + * Fix `count(:all)` with eager loading and having an order other than the driving table. Fixes #31783. -- cgit v1.2.3