aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/relation/query_methods.rb
diff options
context:
space:
mode:
authorJon Leighton <j@jonathanleighton.com>2011-07-28 13:14:11 +0100
committerJon Leighton <j@jonathanleighton.com>2011-07-28 13:14:11 +0100
commit971a74b81f37ec82e06056b738a7215185c51ee6 (patch)
treeec9e5863c80614c684047661c5b993d4eeb0db7c /activerecord/lib/active_record/relation/query_methods.rb
parent30dae273c85a988a39d9b1dec701c0a48267cd5e (diff)
downloadrails-971a74b81f37ec82e06056b738a7215185c51ee6.tar.gz
rails-971a74b81f37ec82e06056b738a7215185c51ee6.tar.bz2
rails-971a74b81f37ec82e06056b738a7215185c51ee6.zip
Revert "Merge pull request #2309 from smasry/master"
This reverts commit 9d396ee8195e31f646e0b89158ed96f4db4ab38f, reversing changes made to fa2bfd832c1d1e997d93c2269a485cc74782c86d. Reason: the change broke the build.
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 3a7b245c51..1654ae1eac 100644
--- a/activerecord/lib/active_record/relation/query_methods.rb
+++ b/activerecord/lib/active_record/relation/query_methods.rb
@@ -312,7 +312,7 @@ module ActiveRecord
when String, Symbol
o.to_s.split(',').collect do |s|
s.strip!
- (s if s =~ /\(/) || 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.concat(' DESC')
end
else
o