diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2005-11-08 21:39:13 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2005-11-08 21:39:13 +0000 |
commit | 97f418ce022da6b5da9cf24779932820e947414d (patch) | |
tree | 06ecd0c098ffdcedc9ad45ff3930e24178c74970 /activerecord/lib/active_record/connection_adapters | |
parent | 86aaa6e9886ec16a76618e819092d0748bbedd53 (diff) | |
download | rails-97f418ce022da6b5da9cf24779932820e947414d.tar.gz rails-97f418ce022da6b5da9cf24779932820e947414d.tar.bz2 rails-97f418ce022da6b5da9cf24779932820e947414d.zip |
Correct handling of complex order clauses with SQL Server limit emulation. Closes #2770.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2943 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/sqlserver_adapter.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/sqlserver_adapter.rb b/activerecord/lib/active_record/connection_adapters/sqlserver_adapter.rb index de40780a5a..a91e1ca56f 100644 --- a/activerecord/lib/active_record/connection_adapters/sqlserver_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/sqlserver_adapter.rb @@ -478,7 +478,7 @@ module ActiveRecord case order when /DESC/i then order.gsub(/DESC/i, "ASC") when /ASC/i then order.gsub(/ASC/i, "DESC") - else String.new(order).insert(-1, " DESC") + else String.new(order).split(',').join(' DESC,') + ' DESC' end end |