Add toggl refetch on loading a page and start to make active cable work

This commit is contained in:
2024-02-04 17:40:09 +00:00
parent 6e85c4103a
commit 2926cfdbea
3 changed files with 13 additions and 3 deletions
@@ -1,4 +1,6 @@
class AttendanceTrackerController < ApplicationController
before_action :refresh_toggl
def index
@courses = Course.active.sort_by(&:title)
@current_lecture = get_current_lecture
@@ -41,4 +43,8 @@ class AttendanceTrackerController < ApplicationController
nil
end
def refresh_toggl
ScrapeTogglJob.perform_later
end
end