Skip to content

Commit

Permalink
Added default value for orderway
Browse files Browse the repository at this point in the history
  • Loading branch information
gmaliar committed Dec 25, 2012
1 parent bfc0d9d commit 68cbc33
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/parse/query.rb
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,9 @@ def limit(num)
self
end

def order(field, order)
def order(field, order = :ascending)
@order_by = field
@order = order ||= :ascending
@order = order
self
end

Expand Down

0 comments on commit 68cbc33

Please sign in to comment.