Sha256: e7e394e0b25a12a9413c3bae55a6d514940daf25c8958eba02623f64f7a9e886

Contents?: true

Size: 252 Bytes

Versions: 9

Compression:

Stored size: 252 Bytes

Contents

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

9 entries across 9 versions & 1 rubygems

Version Path
mongoid_geospatial-3.1.0 spec/models/place.rb
mongoid_geospatial-3.0.0 spec/models/place.rb
mongoid_geospatial-2.8.3 spec/models/place.rb
mongoid_geospatial-2.8.2 spec/models/place.rb
mongoid_geospatial-2.8.1 spec/models/place.rb
mongoid_geospatial-2.8.0 spec/models/place.rb
mongoid_geospatial-2.7.2 spec/models/place.rb
mongoid_geospatial-2.7.1 spec/models/place.rb
mongoid_geospatial-2.7.0 spec/models/place.rb