Les événements renvoyés pas maps.json peuvent maintenant être filtrés par les paramètres region
, locality
et tag
This commit is contained in:
parent
56db804c63
commit
7e29bb43c8
@ -5,7 +5,13 @@ class MapsController < ApplicationController
|
|||||||
def index
|
def index
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html
|
format.html
|
||||||
format.json { render json: Event.moderated.future.geo }
|
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
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user