module Geocoder::Model::Mongoid

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

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

def geocoder_file_name; "mongoid"; end

def geocoder_file_name;   "mongoid"; end

def geocoder_init(options)

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

def geocoder_module_name; "Mongoid"; end

def geocoder_module_name; "Mongoid"; end