mirror of
https://github.com/openSUSE/osem.git
synced 2026-02-07 04:31:00 -05:00
20 lines
579 B
Ruby
20 lines
579 B
Ruby
class ScheduleController < ApplicationController
|
|
authorize_resource class: false
|
|
layout 'application'
|
|
|
|
def index
|
|
@conference = Conference.
|
|
includes(:rooms, events: [:speakers, :track, :event_type]).
|
|
where(conferences: { short_title: params[:conference_id] }).first
|
|
@rooms = @conference.rooms
|
|
@events = @conference.events
|
|
@dates = @conference.start_date..@conference.end_date
|
|
|
|
if @dates == Date.current
|
|
@today = Date.current.strftime('%Y-%m-%d')
|
|
else
|
|
@today = @conference.start_date.strftime('%Y-%m-%d')
|
|
end
|
|
end
|
|
end
|