Module: Mongoid::Geo::Model

Defined in:
lib/mongoid/geo/geo_near.rb

Instance Method Summary collapse

Instance Method Details

#to_modelObject



29
30
31
32
33
# File 'lib/mongoid/geo/geo_near.rb', line 29

def to_model
  m = klass.where(:_id => _id).first.extend(Mongoid::Geo::Distance)
  m.distance = distance
  m
end