Sha256: d81eb66c65e81d3dca320f5f3d781644348a81db31eba882e91773d400b8dbc4

Contents?: true

Size: 674 Bytes

Versions: 72

Compression:

Stored size: 674 Bytes

Contents

require 'geocoder/models/base'
require 'geocoder/models/mongo_base'

module Geocoder
  module Model
    module MongoMapper
      include Base
      include MongoBase

      def self.included(base); base.extend(self); end

      private # --------------------------------------------------------------

      def geocoder_file_name;   "mongo_mapper"; end
      def geocoder_module_name; "MongoMapper"; end

      def geocoder_init(options)
        super(options)
        if options[:skip_index] == false
          ensure_index [[ geocoder_options[:coordinates], Mongo::GEO2D ]],
            :min => -180, :max => 180 # create 2d index
        end
      end
    end
  end
end

Version data entries

72 entries across 72 versions & 7 rubygems

Version Path
geocoder-1.8.3 lib/geocoder/models/mongo_mapper.rb
geocoder-1.8.2 lib/geocoder/models/mongo_mapper.rb
geocoder-1.8.1 lib/geocoder/models/mongo_mapper.rb
geocoder-1.8.0 lib/geocoder/models/mongo_mapper.rb
geocoder-1.7.5 lib/geocoder/models/mongo_mapper.rb
geocoder-1.7.4 lib/geocoder/models/mongo_mapper.rb
geocoder-1.7.3 lib/geocoder/models/mongo_mapper.rb
geocoder-1.7.2 lib/geocoder/models/mongo_mapper.rb
geocoder-1.7.1 lib/geocoder/models/mongo_mapper.rb
geocoder-1.7.0 lib/geocoder/models/mongo_mapper.rb
geocoder-1.6.7 lib/geocoder/models/mongo_mapper.rb
geocoder-1.6.6 lib/geocoder/models/mongo_mapper.rb
geocoder-1.6.5 lib/geocoder/models/mongo_mapper.rb
geocoder-1.6.4 lib/geocoder/models/mongo_mapper.rb
geocoder-1.6.3 lib/geocoder/models/mongo_mapper.rb
geocoder-1.6.2 lib/geocoder/models/mongo_mapper.rb
geocoder-1.6.1 lib/geocoder/models/mongo_mapper.rb
geocoder-1.6.0 lib/geocoder/models/mongo_mapper.rb
geocoder-1.5.2 lib/geocoder/models/mongo_mapper.rb
really-broken-geocoder-2.0.0 lib/geocoder/models/mongo_mapper.rb