Class ScheduleController
In: app/controllers/schedule_controller.rb
Parent: ApplicationController

Controller for schedule/calendar in different formats. Default to current year if not provided.

Caches all of its pages

Methods

calendar   index   list  

Public Instance methods

[Source]

    # File app/controllers/schedule_controller.rb, line 32
32:   def calendar
33:     expires_in 1.hour, :public => true
34:     respond_to do |format|
35:       format.html { render_page }
36:       format.json {
37:         events = []
38:         @events.each do |event|
39:           events << {:id => event.id, :title => event.full_name, :description => event.full_name, :start => "#{event.date}" , :end => "#{event.end_date}", :allDay => true, :url => "#{event.flyer}"} 
40:         end
41:         render :json => events.to_json }
42:     end
43:   end

Default calendar format

Params

  • year: default to current year
  • discipline

Assigns

[Source]

    # File app/controllers/schedule_controller.rb, line 16
16:   def index
17:     expires_in 1.hour, :public => true
18:     render_page
19:   end

List of events — one line per event

Params

  • year: default to current year

Assigns

[Source]

    # File app/controllers/schedule_controller.rb, line 27
27:   def list
28:     expires_in 1.hour, :public => true
29:     render_page
30:   end

[Validate]