Add toggl refetch on loading a page and start to make active cable work
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user