Permalink
Browse files

ordering

  • Loading branch information...
1 parent 3a357a6 commit 623cb54d0ac2ffafdbb794d84fbac51b2133f187 @mattvv mattvv committed Oct 26, 2012
Showing with 8 additions and 8 deletions.
  1. +5 −5 lib/parse_resource/query.rb
  2. +3 −3 lib/parse_resource/query_methods.rb
@@ -24,11 +24,11 @@ def include_object(parent)
end
# deprecating until it works
- #def order(attribute)
- # attribute = attribute.to_sym if attribute.is_a?(String)
- # criteria[:order] = attribute
- # self
- #end
+ def order(attribute)
+ attribute = attribute.to_sym if attribute.is_a?(String)
+ criteria[:order] = attribute
+ self
+ end
def skip(skip)
criteria[:skip] = skip
@@ -44,9 +44,9 @@ def skip(n)
Query.new(self).skip(n)
end
- #def self.order(attribute)
- # Query.new(self).order(attribute)
- #end
+ def self.order(attribute)
+ Query.new(self).order(attribute)
+ end
end
def self.included(base)

0 comments on commit 623cb54

Please sign in to comment.