1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
Commit graph

10 commits

Author SHA1 Message Date
Yasuo Honda
317868d0bd Modify assert conditions not to be affected
by each database bind variable naming conventions
2014-05-12 08:47:06 +02:00
Aaron Patterson
1794ac0197 remove the bind substitution visitor. to_sql should never return bind values 2014-04-09 12:02:43 -07:00
Aaron Patterson
438fce75af Merge branch 'master' into set_binds
* master:
  rm dup code

Conflicts:
	activerecord/test/cases/relations_test.rb
2014-01-14 17:48:13 -08:00
Aaron Patterson
25bc0fbf51 where uses bind values so we don't need to manually create them 2014-01-14 10:43:53 -08:00
Aaron Patterson
f4d600865c remove test that does not apply anymore 2014-01-14 10:41:33 -08:00
Yves Senn
f83c9b10b4 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
```
2013-11-19 17:40:21 +01:00
Yasuo Honda
8e3474bede Address test_merging_where_relations failure by adding order("posts.id") 2013-11-18 02:10:56 +09:00
Yves Senn
c994e10862 fix weird Emacs auto indentation. [ci skip] 2013-11-13 17:56:44 +01:00
Yves Senn
f081edb1fe tests for merging Relations of different classes. 2013-11-13 17:41:26 +01:00
Yves Senn
742adce211 move Relation#merge tests into separate file. 2013-11-13 17:41:20 +01:00