aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/CHANGELOG.md
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2013-01-26 03:18:21 -0800
committerRafael Mendonça França <rafaelmfranca@gmail.com>2013-02-02 10:19:23 -0200
commitbf794bb36f3bd06e2e863cd6c6dfb6ceae116af2 (patch)
treea85eede4f3b73e3f05f3dbc113ae0b361f661867 /activerecord/CHANGELOG.md
parent8f8ae5f03ccc30daae278c397fb88f94216b5229 (diff)
downloadrails-bf794bb36f3bd06e2e863cd6c6dfb6ceae116af2.tar.gz
rails-bf794bb36f3bd06e2e863cd6c6dfb6ceae116af2.tar.bz2
rails-bf794bb36f3bd06e2e863cd6c6dfb6ceae116af2.zip
Merge pull request #9078 from senny/6865_ar_count_with_uniq
`#count` in conjunction with `#uniq` performs distinct count. Conflicts: activerecord/CHANGELOG.md
Diffstat (limited to 'activerecord/CHANGELOG.md')
-rw-r--r--activerecord/CHANGELOG.md9
1 files changed, 9 insertions, 0 deletions
diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md
index 18b5813579..6e8e45db20 100644
--- a/activerecord/CHANGELOG.md
+++ b/activerecord/CHANGELOG.md
@@ -1,5 +1,14 @@
## Rails 3.2.12 (unreleased) ##
+* When `#count` is used in conjunction with `#uniq` we perform `count(:distinct => true)`.
+ Fix #6865.
+
+ Example:
+
+ relation.uniq.count # => SELECT COUNT(DISTINCT *)
+
+ *Yves Senn + Kaspar Schiess*
+
* Fix `ActiveRecord::Relation#pluck` when columns or tables are reserved words.
Backport #7536.
Fix #8968.