Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Can order by raw strings

git-svn-id: https://svn.thoughtbot.com/plugins/squirrel/trunk@149 7bbfaf0e-4d1d-0410-9690-a8bb5f8ef2aa
  • Loading branch information...
commit e99439752dcfe8fc9d61b326ea3c79fa5a73fefb 1 parent f5afaa4
jyurek authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/squirrel.rb
View
2  lib/squirrel.rb
@@ -155,7 +155,7 @@ def order_by *columns
end
def order_clause
- @order.blank? ? nil : @order.collect{|col| col.full_name + (col.negative? ? " DESC" : "") }.join(", ")
+ @order.blank? ? nil : @order.collect{|col| col.respond_to?(:full_name) ? (col.full_name + (col.negative? ? " DESC" : "")) : col }.join(", ")
end
def paginate opts = {}
Please sign in to comment.
Something went wrong with that request. Please try again.