aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/CHANGELOG.md
diff options
context:
space:
mode:
authorYves Senn <yves.senn@gmail.com>2013-02-25 11:40:30 +0100
committerYves Senn <yves.senn@gmail.com>2013-02-25 18:00:34 +0100
commite0356990856abc9a84e6e038e7b06e2931502728 (patch)
treec4c645f0b335f89bd0e47c92e48a45db846813df /activerecord/CHANGELOG.md
parent45321a69b3c01ce8a4cfef6cdf13381d73e10cd3 (diff)
downloadrails-e0356990856abc9a84e6e038e7b06e2931502728.tar.gz
rails-e0356990856abc9a84e6e038e7b06e2931502728.tar.bz2
rails-e0356990856abc9a84e6e038e7b06e2931502728.zip
Expand order(:symbol) to "table".symbol to prevent broken queries on PG.
Fixes #9275. When `#order` is called with a Symbol this patch will prepend the quoted_table_name. Before the postgresql adapter failed to build queries containg a join and an order with a symbol. This expansion happens for all adapters.
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 c7085a0eaa..3b61b98629 100644
--- a/activerecord/CHANGELOG.md
+++ b/activerecord/CHANGELOG.md
@@ -1,5 +1,14 @@
## Rails 4.0.0 (unreleased) ##
+* Fix when performing an ordered join query. The bug only
+ affected queries where the order was given with a symbol.
+ Fixes #9275.
+
+ Example:
+
+ # This will expand the order :name to "authors".name.
+ Author.joins(:books).where('books.published = 1').order(:name)
+
* Fixing issue #8345. Now throwing an error when one attempts to touch a
new object that has not yet been persisted. For instance: