diff options
author | Ben Toews <mastahyeti@gmail.com> | 2017-10-11 13:56:42 -0600 |
---|---|---|
committer | Matthew Draper <matthew@trebex.net> | 2017-11-09 22:42:15 +1030 |
commit | ab03eb9f576312c75e61caaf9705a8ac5175c769 (patch) | |
tree | 24d4bb433238f1eec10a1fb4d76510e382096a58 /activerecord/lib/active_record | |
parent | 798557145c727b2abef2487783f02e57f04197c9 (diff) | |
download | rails-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')
-rw-r--r-- | activerecord/lib/active_record/relation/query_methods.rb | 2 |
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 |