app/models/location.rb
def shifts_between(start_time, end_time)
    start_time = start_time.to_time
    end_time = end_time.to_time
    shifts = Shift.where("start >= ? AND end <= ? AND location_id = ? AND active = ?", start_time, end_time, self.id, true)
  end
#necessary for tasks
#this really should be on the shift model I think
necessary for tasks
this really should be on the shift model I think
necessary for tasks this really should be on the shift model I think
def shifts_between(start_time, end_time)
    start_time = start_time.to_time
    end_time = end_time.to_time
    shifts = Shift.where("start >= ? AND end <= ? AND location_id = ? AND active = ?", start_time, end_time, self.id, true)
  end
def shifts_between ( start_time , end_time ) start_time = start_time . to_time end_time = end_time . to_time shifts = Shift . where ( "start >= ? AND end <= ? AND location_id = ? AND active = ?" , start_time , end_time , self . id , true ) end
necessary for tasks
this really should be on the shift model I think
necessary for tasks this really should be on the shift model I think
start_time
end_time