Jörgen Nilsson - MongoMunich 2011 Scenario 2 - Adding locations near our property Our property document now looks like this class Place include Mongoid::Document include Mongoid::Timestamps field :user_id, type: Integer field :street, type: String field :postal_town, type: String field :postal_code, type: String field :country, type: String field :formatted_address, type: String field :location, type: Hash field embeds_many :surroundings index [[ :location, Mongo::GEO2D ]], min: 180, max: 180 end måndag 17 oktober 11