diff options
author | Yves Senn <yves.senn@gmail.com> | 2013-11-13 17:26:55 +0100 |
---|---|---|
committer | Yves Senn <yves.senn@gmail.com> | 2013-11-19 17:40:21 +0100 |
commit | f83c9b10b4c92b0d8deacb30d6fdfa2b1252d6dd (patch) | |
tree | 2320f2867a13a1f30faddadb92eb65c98bec8597 /guides/code/getting_started/vendor/assets | |
parent | a7afceec3e491bbf505c690b3019445593c04f68 (diff) | |
download | rails-f83c9b10b4c92b0d8deacb30d6fdfa2b1252d6dd.tar.gz rails-f83c9b10b4c92b0d8deacb30d6fdfa2b1252d6dd.tar.bz2 rails-f83c9b10b4c92b0d8deacb30d6fdfa2b1252d6dd.zip |
use arel nodes to represent non-string `order_values`.
This fixes a bug when merging relations of different classes.
```
Given:
Post.joins(:author).merge(Author.order(name: :desc)).to_sql
Before:
SELECT "posts".* FROM "posts"
INNER JOIN "authors" ON "authors"."id" = "posts"."author_id"
ORDER BY "posts"."name" DESC
After:
SELECT "posts".* FROM "posts"
INNER JOIN "authors" ON "authors"."id" = "posts"."author_id"
ORDER BY "authors"."name" DESC
```
Diffstat (limited to 'guides/code/getting_started/vendor/assets')
0 files changed, 0 insertions, 0 deletions