lafcadio 0.7.2 → 0.7.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/lafcadio.rb +1 -1
- data/lib/lafcadio.rb~ +1 -1
- data/lib/lafcadio/mock.rb +1 -1
- data/lib/lafcadio/mock.rb~ +3 -1
- metadata +2 -2
data/lib/lafcadio.rb
CHANGED
data/lib/lafcadio.rb~
CHANGED
data/lib/lafcadio/mock.rb
CHANGED
data/lib/lafcadio/mock.rb~
CHANGED
@@ -43,9 +43,11 @@ module Lafcadio
|
|
43
43
|
if ( order_by = query.order_by )
|
44
44
|
objects = objects.sort_by { |dobj| dobj.send( order_by ) }
|
45
45
|
objects.reverse! if query.order_by_order == Query::DESC
|
46
|
+
else
|
47
|
+
objects = objects.sort_by { |dobj| dobj.pk_id }
|
46
48
|
end
|
47
49
|
if (range = query.limit)
|
48
|
-
objects = objects[
|
50
|
+
objects = objects[range.first..(range.last - range.first)]
|
49
51
|
end
|
50
52
|
objects
|
51
53
|
end
|
metadata
CHANGED