Sha256: a36761e6b877d6b566b3ee36efff0c636689455f39b1d33c7252b6673a1bca67

Contents?: true

Size: 597 Bytes

Versions: 6

Compression:

Stored size: 597 Bytes

Contents

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

module Geocoder
  module Model
    module Mongoid
      include Base
      include MongoBase

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

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

      def geocoder_file_name;   "mongoid"; end
      def geocoder_module_name; "Mongoid"; end

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

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
geocoder-1.1.1 lib/geocoder/models/mongoid.rb
geocoder-1.1.0 lib/geocoder/models/mongoid.rb
geocoder-1.0.5 lib/geocoder/models/mongoid.rb
geocoder-1.0.4 lib/geocoder/models/mongoid.rb
geocoder-1.0.3 lib/geocoder/models/mongoid.rb
geocoder-1.0.2 lib/geocoder/models/mongoid.rb