app/models/events/event_staff.rb
def no_overlapping_times
    return true unless shift.overlaps_other_shifts?
    for other in shift.overlapping_shifts
      errors.add_to_base "This shift overlaps with #{other.position.title} shift #{other.time_detail}" if other.signed_up?(person)
    end
  end
# If the time for this shift overlaps with another shift for this event that this person is signed up for, then return an error.
If the time for this shift overlaps with another shift for this event that this person is signed up for, then return an error.
If the time for this shift overlaps with another shift for this event that this person is signed up for then return an error .
def no_overlapping_times
    return true unless shift.overlaps_other_shifts?
    for other in shift.overlapping_shifts
      errors.add_to_base "This shift overlaps with #{other.position.title} shift #{other.time_detail}" if other.signed_up?(person)
    end
  end
def no_overlapping_times return true unless shift . overlaps_other_shifts? for other in shift . overlapping_shifts errors . add_to_base "This shift overlaps with #{other.position.title} shift #{other.time_detail}" if other . signed_up? ( person ) end end
If the time for this shift overlaps with another shift for this event that this person is signed up for, then return an error.
If the time for this shift overlaps with another shift for this event that this person is signed up for then return an error .