Sha256: ce8b1d3b0babff66ef2ef0d354e0d9b90025a0d86e55cd28555a71501df794d2
Contents?: true
Size: 877 Bytes
Versions: 69
Compression:
Stored size: 877 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) if options[:skip_index] == false # create 2d index if defined?(::Mongoid::VERSION) && ::Mongoid::VERSION >= "3" index({ geocoder_options[:coordinates].to_sym => '2d' }, {:min => -180, :max => 180}) else index [[ geocoder_options[:coordinates], '2d' ]], :min => -180, :max => 180 end end end end end end
Version data entries
69 entries across 69 versions & 7 rubygems