app/models/task.rb
#returns a boolean if an hour has passed after the scheduled task was supposed to be done.
returns a boolean if an hour has passed after the scheduled task was supposed to be done.
returns a boolean if an hour has passed after the scheduled task was supposed to be done .
def late_time
    scheduled_time = self.time_of_day.seconds_since_midnight
    now_time = Time.now.seconds_since_midnight
    seconds_past_scheduled = now_time - scheduled_time
    if seconds_past_scheduled >= location.department.department_config.task_leniency.minutes
      return true
    elsif self.kind == "Hourly"
    else
      return false
    end
  end
def late_time scheduled_time = self . time_of_day . seconds_since_midnight now_time = Time . now . seconds_since_midnight seconds_past_scheduled = now_time - scheduled_time if seconds_past_scheduled >= location . department . department_config . task_leniency . minutes return true elsif self . kind == "Hourly" else return false end end
returns a boolean if an hour has passed after the scheduled task was supposed to be done.
returns a boolean if an hour has passed after the scheduled task was supposed to be done .