Class: Decidim::Meetings::CalendarsController

Inherits:
ApplicationController show all
Includes:
ComponentFilterable, FilterResource
Defined in:
app/controllers/decidim/meetings/calendars_controller.rb

Overview

Exposes the meeting resources as an .ics file so users can import them to their favorite calendar app

Instance Method Summary collapse

Instance Method Details

#meeting_calendarObject



20
21
22
# File 'app/controllers/decidim/meetings/calendars_controller.rb', line 20

def meeting_calendar
  send_data CalendarRenderer.for(meeting), content_type: "type/calendar", filename: "#{meeting.reference}.ics"
end

#showObject



16
17
18
# File 'app/controllers/decidim/meetings/calendars_controller.rb', line 16

def show
  render plain: CalendarRenderer.for(current_component, filter_params), content_type: "type/calendar"
end