aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases
diff options
context:
space:
mode:
authorBen Toews <mastahyeti@gmail.com>2017-10-11 13:56:42 -0600
committerMatthew Draper <matthew@trebex.net>2017-11-09 22:42:15 +1030
commitab03eb9f576312c75e61caaf9705a8ac5175c769 (patch)
tree24d4bb433238f1eec10a1fb4d76510e382096a58 /activerecord/test/cases
parent798557145c727b2abef2487783f02e57f04197c9 (diff)
downloadrails-ab03eb9f576312c75e61caaf9705a8ac5175c769.tar.gz
rails-ab03eb9f576312c75e61caaf9705a8ac5175c769.tar.bz2
rails-ab03eb9f576312c75e61caaf9705a8ac5175c769.zip
use << instead of #concat in #reverse_sql_order because we might be working with Arel SQL literator which overrides #concat
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r--activerecord/test/cases/relations_test.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/test/cases/relations_test.rb b/activerecord/test/cases/relations_test.rb
index 6dfb78d913..f3f82e7591 100644
--- a/activerecord/test/cases/relations_test.rb
+++ b/activerecord/test/cases/relations_test.rb
@@ -238,7 +238,7 @@ class RelationTest < ActiveRecord::TestCase
end
def test_reverse_order_with_function
- topics = Topic.order("length(title)").reverse_order
+ topics = Topic.order(Arel.sql("length(title)")).reverse_order
assert_equal topics(:second).title, topics.first.title
end