Class: Decidim::Meetings::CalendarsController

Inherits:
ApplicationController show all
Defined in:
decidim-meetings/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



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

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

#showObject



13
14
15
# File 'decidim-meetings/app/controllers/decidim/meetings/calendars_controller.rb', line 13

def show
  render plain: CalendarRenderer.for(current_component, params[:filter]), content_type: "type/calendar"
end