Skip to content
Browse files

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.
  • Loading branch information...
1 parent c26c273 commit cbf3e33176b6c54b3187794b81d39500db089a37 @rsim rsim committed with tenderlove Jun 28, 2011
Showing with 3 additions and 3 deletions.
  1. +3 −3 activerecord/test/cases/relations_test.rb
View
6 activerecord/test/cases/relations_test.rb
@@ -177,9 +177,9 @@ def test_finding_with_order_and_take
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

0 comments on commit cbf3e33

Please sign in to comment.
Something went wrong with that request. Please try again.