agenda-libre-ruby/app/controllers/maps_controller.rb

18 lines
465 B
Ruby
Raw Normal View History

# Geocoding
#
# Access to OSM controls
class MapsController < ApplicationController
def index
respond_to do |format|
format.html
format.json do
@events = Event.moderated.future.geo
@events = @events.region params[:region] if params[:region]
@events = @events.locality params[:locality] if params[:locality]
@events = @events.tag params[:tag] if params[:tag]
render json: @events
end
end
end
end