Skip to content

Instantly share code, notes, and snippets.

@simoncozens
Created September 30, 2012 15:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save simoncozens/3807064 to your computer and use it in GitHub Desktop.
Save simoncozens/3807064 to your computer and use it in GitHub Desktop.
class MiscController < ApplicationController
# Useful stuff which doesn't belong anywhere else
def geocode
render :json => Geokit::Geocoders::GoogleGeocoder.geocode(params[:q])
end
def reverse_geocode
render :json => Geokit::Geocoders::GoogleGeocoder.reverse_geocode(params[:q])
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment