aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/relation/query_methods.rb
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/lib/active_record/relation/query_methods.rb
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/lib/active_record/relation/query_methods.rb')
-rw-r--r--activerecord/lib/active_record/relation/query_methods.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/relation/query_methods.rb b/activerecord/lib/active_record/relation/query_methods.rb
index 59a732168c..34723b0b4f 100644
--- a/activerecord/lib/active_record/relation/query_methods.rb
+++ b/activerecord/lib/active_record/relation/query_methods.rb
@@ -1088,7 +1088,7 @@ module ActiveRecord
end
o.split(",").map! do |s|
s.strip!
- s.gsub!(/\sasc\Z/i, " DESC") || s.gsub!(/\sdesc\Z/i, " ASC") || s.concat(" DESC")
+ s.gsub!(/\sasc\Z/i, " DESC") || s.gsub!(/\sdesc\Z/i, " ASC") || (s << " DESC")
end
else
o