# Geocoding # # Access to OSM controls class MapsController < ApplicationController has_scope :region, :locality, :tag, :daylimit has_scope :future, type: :boolean, default: true has_scope :period, allow_blank: true, type: :hash, using: [:year, :week], default: { year: (Time.zone.today + 7.days).year, week: (Time.zone.today + 7.days).cweek } def index respond_to do |format| format.html { render layout: 'iframe' if params[:iframe] } format.json { render json: apply_scopes(Event.moderated.geo) } end end end