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

16 lines
431 B
Ruby
Raw Normal View History

# Geocoding
#
# Access to OSM controls
class MapsController < ApplicationController
2015-11-10 23:29:05 +01:00
has_scope :region, :locality, :tag, :daylimit
has_scope :future, type: :boolean, default: true
has_scope :period, type: :hash, using: [:year, :week]
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