aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2019-06-26 08:56:00 +0900
committerRyuta Kamizono <kamipo@gmail.com>2019-06-26 08:56:00 +0900
commitf6db8b8d8286730757570a8b0f92e6b6be779fa8 (patch)
tree2f107359fad6c9cb981afe2c5bd944868ed98d1f /activerecord/test
parente80cf005b6eaf7cc9e9fef70b0da270ab8da2bcb (diff)
downloadrails-f6db8b8d8286730757570a8b0f92e6b6be779fa8.tar.gz
rails-f6db8b8d8286730757570a8b0f92e6b6be779fa8.tar.bz2
rails-f6db8b8d8286730757570a8b0f92e6b6be779fa8.zip
`length(title)` is a safe SQL string since #36448
Diffstat (limited to 'activerecord/test')
-rw-r--r--activerecord/test/cases/relations_test.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/test/cases/relations_test.rb b/activerecord/test/cases/relations_test.rb
index 5df1e3ccf9..1a20fe5dc2 100644
--- a/activerecord/test/cases/relations_test.rb
+++ b/activerecord/test/cases/relations_test.rb
@@ -308,9 +308,9 @@ class RelationTest < ActiveRecord::TestCase
end
def test_reverse_order_with_function_other_predicates
- topics = Topic.order(Arel.sql("author_name, length(title), id")).reverse_order
+ topics = Topic.order("author_name, length(title), id").reverse_order
assert_equal topics(:second).title, topics.first.title
- topics = Topic.order(Arel.sql("length(author_name), id, length(title)")).reverse_order
+ topics = Topic.order("length(author_name), id, length(title)").reverse_order
assert_equal topics(:fifth).title, topics.first.title
end