ryanong/mongoid_spacial

Wrong collection used when store_in is specified

ianiv opened this issue · 0 comments

If the collection name for a class is explicitly specified using "store_in" then the wrong collection name is used in geoNear queries. For example:

class V2::User
  include Mongoid::Document
  include Mongoid::Spacial::Document

  store_in :users

end

geoNear queries for that class will try to use the collection "v2/user" instead of "users"