app/models/map/extensions/point.rb
# convert mongoid native type to its custom type(this class)
convert mongoid native type to its custom type(this class)
convert mongoid native type to its custom type ( this class )
def demongoize(object)
      return self.new if object.nil?
      ret = self.new
      ret.merge!(object.to_h)
      ret
    end
def demongoize ( object ) return self . new if object . nil? ret = self . new ret . merge! ( object . to_h ) ret end
convert mongoid native type to its custom type(this class)
convert mongoid native type to its custom type ( this class )
object
<not_specific>