mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Revert "Merge pull request #2309 from smasry/master"
This reverts commit9d396ee819
, reversing changes made tofa2bfd832c
. Reason: the change broke the build.
This commit is contained in:
parent
66fdfbc2d5
commit
bec5977932
2 changed files with 1 additions and 6 deletions
|
@ -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
|
||||
|
|
|
@ -911,11 +911,6 @@ class RelationTest < ActiveRecord::TestCase
|
|||
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')
|
||||
|
|
Loading…
Reference in a new issue