18 lines
465 B
Ruby
18 lines
465 B
Ruby
# 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
|