Permalink
Browse files

Revert "Merge pull request #2309 from smasry/master"

This reverts commit 9d396ee, reversing
changes made to fa2bfd8.

Reason: the change broke the build.
  • Loading branch information...
1 parent 66fdfbc commit bec59779326daa35aab483fa8b95c0f87440fede @jonleighton jonleighton committed with fxn Jul 28, 2011
@@ -312,7 +312,7 @@ def reverse_sql_order(order_query)
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
@@ -911,11 +911,6 @@ def test_default_scope_order_with_scope_order
assert_equal 'zyke', FastCar.order_using_old_style.limit(1).first.name
end
- def test_order_with_function_and_last
- authors = Author.scoped
- assert_equal authors(:bob), authors.order( "id asc, MAX( organization_id, owned_essay_id)" ).last
- end
-
def test_order_using_scoping
car1 = CoolCar.order('id DESC').scoping do
CoolCar.find(:first, :order => 'id asc')

0 comments on commit bec5977

Please sign in to comment.