Rubocop autocorrections
This commit is contained in:
parent
299738f58d
commit
43bef689fc
85 changed files with 622 additions and 578 deletions
|
|
@ -99,6 +99,7 @@ module ApplicationHelper
|
|||
|
||||
def concurrent_events(event)
|
||||
return nil unless event.scheduled? && event.program.selected_event_schedules
|
||||
|
||||
event_schedule = event.program.selected_event_schedules.find { |es| es.event == event }
|
||||
other_event_schedules = event.program.selected_event_schedules.reject { |other_event_schedule| other_event_schedule == event_schedule }
|
||||
concurrent_events = []
|
||||
|
|
@ -106,6 +107,7 @@ module ApplicationHelper
|
|||
event_time_range = (event_schedule.start_time.strftime '%Y-%m-%d %H:%M')...(event_schedule.end_time.strftime '%Y-%m-%d %H:%M')
|
||||
other_event_schedules.each do |other_event_schedule|
|
||||
next unless other_event_schedule.event.confirmed?
|
||||
|
||||
other_event_time_range = (other_event_schedule.start_time.strftime '%Y-%m-%d %H:%M')...(other_event_schedule.end_time.strftime '%Y-%m-%d %H:%M')
|
||||
if (event_time_range.to_a & other_event_time_range.to_a).present?
|
||||
concurrent_events << other_event_schedule.event
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue