osem-fcy/app/controllers/schedule_controller.rb

18 lines
560 B
Ruby
Raw Normal View History

class ScheduleController < ApplicationController
2014-08-12 11:51:59 +03:00
authorize_resource class: false
layout "application"
2014-08-12 11:51:59 +03:00
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
2013-07-29 02:01:24 +03:00
2014-07-30 23:43:00 +02:00
if @dates == Date.current
2013-07-29 02:01:24 +03:00
@today = Date.current.strftime("%Y-%m-%d")
else
@today = @conference.start_date.strftime("%Y-%m-%d")
end
2013-07-29 02:01:24 +03:00
end
end