property :latitude property :longitude validates :latitude, presence: true, numericality: true validates :longitude, presence: true, numericality: true end property :southwest do property :latitude property :longitude validates :latitude, presence: true, numericality: true validates :longitude, presence: true, numericality: true end def collections # search は scope Shop.search(northeast: northeast, southwest: southwest) end end end