Json listing of events
This commit is contained in:
parent
19e3b659fd
commit
2e2d790d35
@ -13,6 +13,7 @@ class EventsController < ApplicationController
|
||||
def index
|
||||
respond_to do |format|
|
||||
format.html { render layout: 'iframe' if params[:iframe] }
|
||||
format.json { }
|
||||
format.rss { @events = @events.future }
|
||||
format.ics { @events = @events.last_year.includes :region }
|
||||
format.xml { @events = @events.includes :region }
|
||||
|
@ -1,6 +1,6 @@
|
||||
json.array!(@events) do |event|
|
||||
json.extract! event, :id, :title, :description, :start_time, :end_time,
|
||||
:address, :city, :region_id, :locality, :url, :contact,
|
||||
:place_name, :address, :city, :region_id, :locality, :url,
|
||||
:contact, :submitter, :moderated, :tags, :secret,
|
||||
:decision_time, :submission_time, :moderator_mail_id,
|
||||
:submitter_mail_id
|
||||
|
Loading…
Reference in New Issue
Block a user