Sha256: 5739ceb86d2c02a590a3a01bcaccdcbe1340cd710ad329fb8f4b56a87ad17714

Contents?: true

Size: 259 Bytes

Versions: 5

Compression:

Stored size: 259 Bytes

Contents

# Sample spec class
class Place
  include Mongoid::Document
  include Mongoid::Geospatial

  field :name,     type: String
  field :location, type: Point, spatial: true

  has_one :rating, as: :ratable

  spatial_index :location
  spatial_scope :location
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
mongoid-geospatial-5.1.0 spec/models/place.rb
mongoid-geospatial-5.0.0 spec/models/place.rb
mongoid-geospatial-4.0.1 spec/models/place.rb
mongoid-geospatial-4.0.0 spec/models/place.rb
mongoid-geospatial-3.9.0 spec/models/place.rb