Skip to content
This repository
Browse code

ordering

  • Loading branch information...
commit 623cb54d0ac2ffafdbb794d84fbac51b2133f187 1 parent 3a357a6
Matt Van mattvv authored
10 lib/parse_resource/query.rb
@@ -24,11 +24,11 @@ def include_object(parent)
24 24 end
25 25
26 26 # deprecating until it works
27   - #def order(attribute)
28   - # attribute = attribute.to_sym if attribute.is_a?(String)
29   - # criteria[:order] = attribute
30   - # self
31   - #end
  27 + def order(attribute)
  28 + attribute = attribute.to_sym if attribute.is_a?(String)
  29 + criteria[:order] = attribute
  30 + self
  31 + end
32 32
33 33 def skip(skip)
34 34 criteria[:skip] = skip
6 lib/parse_resource/query_methods.rb
@@ -44,9 +44,9 @@ def skip(n)
44 44 Query.new(self).skip(n)
45 45 end
46 46
47   - #def self.order(attribute)
48   - # Query.new(self).order(attribute)
49   - #end
  47 + def self.order(attribute)
  48 + Query.new(self).order(attribute)
  49 + end
50 50 end
51 51
52 52 def self.included(base)

0 comments on commit 623cb54

Please sign in to comment.
Something went wrong with that request. Please try again.