Skip to content

Instantly share code, notes, and snippets.

@sapient
Created November 12, 2011 15:43
Show Gist options
  • Save sapient/1360708 to your computer and use it in GitHub Desktop.
Save sapient/1360708 to your computer and use it in GitHub Desktop.
def index
if Rails.env == "development"
longitude = "-95.2752"
latitude = "29.9459"
else
longitude = request.location.longitude
latitude = request.location.latitude
end
@venues = Venue.near([latitude, longitude].join(", "), 60)
respond_to do |format|
format.html # index.html.erb
format.json { render json: @venues }
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment