Rebuild rubocop TODOs after auto-correcting

This commit is contained in:
James Mason 2018-04-04 10:18:51 -07:00
parent 31c50255e9
commit 84dbb52d11
No known key found for this signature in database
GPG key ID: 1B3951886C449023
580 changed files with 3689 additions and 3133 deletions

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class SchedulesController < ApplicationController
load_and_authorize_resource
protect_from_forgery with: :null_session
@ -8,11 +10,9 @@ class SchedulesController < ApplicationController
def show
@rooms = @conference.venue.rooms if @conference.venue
schedules = @program.selected_event_schedules
unless schedules
redirect_to events_conference_schedule_path(@conference.short_title)
end
redirect_to events_conference_schedule_path(@conference.short_title) unless schedules
@events_xml = schedules.map(&:event).group_by{ |event| event.time.to_date } if schedules
@events_xml = schedules.map(&:event).group_by { |event| event.time.to_date } if schedules
@dates = @conference.start_date..@conference.end_date
@step_minutes = @program.schedule_interval.minutes
@conf_start = @conference.start_hour
@ -20,7 +20,7 @@ class SchedulesController < ApplicationController
# the schedule takes you to today if it is a date of the schedule
@current_day = @conference.current_conference_day
@day = @current_day.present? ? @current_day : @dates.first
@day = @current_day.presence || @dates.first
unless @current_day
# the schedule takes you to the current time if it is beetween the start and the end time.
@hour_column = @conference.hours_from_start_time(@conf_start, @conference.end_hour)
@ -37,7 +37,7 @@ class SchedulesController < ApplicationController
@dates = @conference.start_date..@conference.end_date
@events_schedules = @program.selected_event_schedules
@events_schedules = [] unless @events_schedules
@events_schedules ||= []
@unscheduled_events = @program.events.confirmed - @events_schedules.map(&:event)
@ -48,8 +48,10 @@ class SchedulesController < ApplicationController
private
def respond_to_options
respond_to do |format|
format.html { head :ok }
end if request.options?
if request.options?
respond_to do |format|
format.html { head :ok }
end
end
end
end