Skip to content

Commit

Permalink
Adjust documentation syntax error for geo_spacial polygon selections. F…
Browse files Browse the repository at this point in the history
…ixes mongoid#102.

The correct query is to use triple brackets as specified in the specs and
in mongodb documentation. The example documentation for Origin was missing
a set of brackets.
  • Loading branch information
astjohn committed Dec 23, 2014
1 parent 5c59ec4 commit 3aec3fd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/origin/selectable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,10 @@ def exists(criterion = nil)
# query.geo_spacial(:location.intersects_point => [[ 1, 10 ]])
#
# @example Add a geo intersect criterion for a polygon.
# query.geo_spacial(:location.intersects_polygon => [[ 1, 10 ], [ 2, 10 ], [ 1, 10 ]])
# query.geo_spacial(:location.intersects_polygon => [[[ 1, 10 ], [ 2, 10 ], [ 1, 10 ]]])
#
# @example Add a geo within criterion for a polygon.
# query.geo_spacial(:location.within_polygon => [[ 1, 10 ], [ 2, 10 ], [ 1, 10 ]])
# query.geo_spacial(:location.within_polygon => [[[ 1, 10 ], [ 2, 10 ], [ 1, 10 ]]])
#
# @example Add a geo within criterian for a circle.
# query.geo_spacial(:location.within_circle => [[x, y], radius])
Expand Down

0 comments on commit 3aec3fd

Please sign in to comment.