Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

mongoid 3.1 geo_near pagination fails #375

Closed
robj opened this Issue · 1 comment

2 participants

@robj
User.geo_near([ current_user.lat, current_user.lng ]).page(params[:page]).per(per_page)
# => NoMethodError - undefined method `page' for #<Mongoid::Contextual::GeoNear:0x007fe02c63bff0>:
@yuki24
Collaborator

Does this work for you?

User.page(params[:page]).per(per_page).geo_near([ current_user.lat, current_user.lng ])

I'm not sure if it works but feel free to send a pull request to get it working!

@yuki24 yuki24 closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.