Skip to content
Snippets Groups Projects
init.rb 407 B
Newer Older
ActiveRecord::Base.class_eval do
  
  ##
  # Include the Geocoder module and set the method name which returns
  # the geo-search string.
  #
  def self.geocoded_by(method_name = :location, options = {})
    @geocoder_method_name    = method_name
    @geocoder_latitude_attr  = options[:latitude]  || :latitude
    @geocoder_longitude_attr = options[:longitude] || :longitude