mongoid_spacial
mongoid_spacial copied to clipboard
A Mongoid Extention that simplifies and adds support for MongoDB Geo Spacial Calculations.
Can we not chain the geo_near query ? Say we have a scope ``` ruby scope :enabled, where(:enabled => true) ``` This chain would work: ``` ruby def look_for_enabled_close_to self.enabled.geo_near([1.0,...
# backtrace NameError: uninitialized constant Mongoid::Spacial::Document::ClassMethods::Mongo from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/mongoid_spacial-0.2.13/lib/mongoid_spacial/spacial/document.rb:19:in `spacial_index' from /home/eddie/projects/zooti/app/models/provisioning_manager_server.rb:20:in`class:ProvisioningManagerServer' from /home/eddie/projects/zooti/app/models/provisioning_manager_server.rb:1:in `' from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/zeus-0.13.3/lib/zeus/load_tracking.rb:50:in`load' from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/zeus-0.13.3/lib/zeus/load_tracking.rb:50:in `load' from (irb):1 from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/commands/console.rb:90:in`start' from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/commands/console.rb:9:in `start' from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/commands.rb:64:in`' from ./bin/rails:4:in...
I've code like this: ``` field :geo, type: Array, spacial: true spacial_index :geo ``` I've run `rake db:mongoid:create_indexes` and I keep getting : ``` Problem: Invalid index specification on CarPark:...
Hi Ryan, I just added the sea mile factor to EARTH_RADIUS. Cheers, Norman
For some reason, no matter how many matching documents I should have, I'm always getting max 100 results back. ``` ruby where( :coordinates.near(:sphere) => { point: [some_longitude, some_latitude], max: search_radius,...
when trying to save location (an spacial_index field) with latitude or longitude parameters out of range, the mongoid save seems to work correct (no error, no exception), if you print...