Sha256: 806823dbfb6aac6aa77f7c3c4880610f4a1c12fab1689b2955d679335e9f6e48
Contents?: true
Size: 856 Bytes
Versions: 9
Compression:
Stored size: 856 Bytes
Contents
require 'geocoder' module Geocoder ## # Methods for invoking Geocoder in a model. # module Model module Base def geocoder_options if defined?(@geocoder_options) @geocoder_options elsif superclass.respond_to?(:geocoder_options) superclass.geocoder_options || { } else { } end end def geocoded_by fail end def reverse_geocoded_by fail end private # ---------------------------------------------------------------- def geocoder_init(options) unless @geocoder_options @geocoder_options = {} require "geocoder/stores/#{geocoder_file_name}" include Geocoder::Store.const_get(geocoder_module_name) end @geocoder_options.merge! options end end end end
Version data entries
9 entries across 9 versions & 2 rubygems