aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/CHANGELOG.md3
-rw-r--r--activerecord/test/cases/calculations_test.rb2
2 files changed, 3 insertions, 2 deletions
diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md
index c8fa387b42..4323c57b9e 100644
--- a/activerecord/CHANGELOG.md
+++ b/activerecord/CHANGELOG.md
@@ -1,9 +1,10 @@
* Fix different `count` calculation when using `size` with manual `select` with DISTINCT.
-
+
Fixes #35214.
*Juani Villarejo*
+
## Rails 6.0.0.beta2 (February 25, 2019) ##
* Fix prepared statements caching to be enabled even when query caching is enabled.
diff --git a/activerecord/test/cases/calculations_test.rb b/activerecord/test/cases/calculations_test.rb
index 840920ccb6..f1e35d6ab9 100644
--- a/activerecord/test/cases/calculations_test.rb
+++ b/activerecord/test/cases/calculations_test.rb
@@ -478,7 +478,7 @@ class CalculationsTest < ActiveRecord::TestCase
end
def test_should_count_with_manual_distinct_select_and_distinct
- assert_equal 4, Account.select("DISTINCT accounts.firm_id").distinct(:id).count
+ assert_equal 4, Account.select("DISTINCT accounts.firm_id").distinct(true).count
end
def test_should_count_manual_select_with_group_with_count_all