diff options
author | Raimonds Simanovskis <raimonds.simanovskis@gmail.com> | 2011-06-28 23:04:42 +0300 |
---|---|---|
committer | Raimonds Simanovskis <raimonds.simanovskis@gmail.com> | 2011-06-28 23:04:42 +0300 |
commit | f838b47b87f54c15a51c7310d3244d7d1712160f (patch) | |
tree | 3365fadd093e45a0f32618de06753c9b4966b321 /activerecord | |
parent | 941d5c1f4051416e1b7993374343e343027978a7 (diff) | |
download | rails-f838b47b87f54c15a51c7310d3244d7d1712160f.tar.gz rails-f838b47b87f54c15a51c7310d3244d7d1712160f.tar.bz2 rails-f838b47b87f54c15a51c7310d3244d7d1712160f.zip |
Fix test_finding_with_cross_table_order_and_limit for Oracle
Use latest Arel syntax and pass each order by expression as separate argument to order method as otherwise invalid Oracle SQL is generated.
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/test/cases/relations_test.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/activerecord/test/cases/relations_test.rb b/activerecord/test/cases/relations_test.rb index d88bde3860..5a95e68eb4 100644 --- a/activerecord/test/cases/relations_test.rb +++ b/activerecord/test/cases/relations_test.rb @@ -177,9 +177,9 @@ class RelationTest < ActiveRecord::TestCase end def test_finding_with_cross_table_order_and_limit - tags = Tag.includes(:taggings) \ - .order("tags.name asc, taggings.taggable_id asc, REPLACE('abc', taggings.taggable_type, taggings.taggable_type)") \ - .limit(1).to_a + tags = Tag.includes(:taggings). + order("tags.name asc", "taggings.taggable_id asc", "REPLACE('abc', taggings.taggable_type, taggings.taggable_type)"). + limit(1).to_a assert_equal 1, tags.length end |