Browse Source

Fixed conflit error where workshops would have errors with themselves

development
Godwin 9 years ago
parent
commit
ec03ff3959
  1. 4
      app/helpers/schedule_helper.rb

4
app/helpers/schedule_helper.rb

@ -37,8 +37,8 @@ module ScheduleHelper
if conflict.present? if conflict.present?
w_conflict = get_workshop(conflict, @workshops, @events) w_conflict = get_workshop(conflict, @workshops, @events)
workshop_errors[(w_conflict.is_a?(Workshop) ? 'w' : 'e') + w_conflict.id.to_s] = "Time conflict with &ldquo;<strong>#{w_conflict.title}</strong>&rdquo;".html_safe workshop_errors[(w_conflict.is_a?(Workshop) ? 'w' : 'e') + w_conflict.id.to_s] = "Time conflict with &ldquo;<strong>#{w.title}</strong>&rdquo;".html_safe
workshop_errors[(w.is_a?(Workshop) ? 'w' : 'e') + w.id.to_s] = "Time conflict with &ldquo;<strong>#{w.title}</strong>&rdquo;".html_safe workshop_errors[(w.is_a?(Workshop) ? 'w' : 'e') + w.id.to_s] = "Time conflict with &ldquo;<strong>#{w_conflict.title}</strong>&rdquo;".html_safe
errors += 1 if workshop_errors[(w_conflict.is_a?(Workshop) ? 'w' : 'e') + w_conflict.id.to_s].nil? errors += 1 if workshop_errors[(w_conflict.is_a?(Workshop) ? 'w' : 'e') + w_conflict.id.to_s].nil?
else else
schedule[day][:start_time] = hour if schedule[day][:start_time].nil? || hour < schedule[day][:start_time] schedule[day][:start_time] = hour if schedule[day][:start_time].nil? || hour < schedule[day][:start_time]

Loading…
Cancel
Save