Skip to content

Commit

Permalink
Merge f9ada24 into f4f489e
Browse files Browse the repository at this point in the history
  • Loading branch information
vanboom committed Nov 18, 2014
2 parents f4f489e + f9ada24 commit 03d1639
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lib/mongoid/contextual/geo_near.rb
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,18 @@ def inspect
max: #{command[:maxDistance] || "N/A"}
unique: #{command[:unique].nil? ? true : command[:unique]}
spherical: #{command[:spherical] || false}>
limit: #{command[:limit] || 100}>
}
end

def limit( value=nil )
if value
command[:limit] = value
self
else
stats["limit"]
end
end
# Specify the maximum distance to find documents for, or get the value of
# the document with the furthest distance.
#
Expand Down

0 comments on commit 03d1639

Please sign in to comment.