Remove attendances model

This commit is contained in:
2023-10-06 22:09:38 +01:00
parent 84143c683f
commit 3540fa75f7
7 changed files with 6 additions and 142 deletions
-13
View File
@@ -1,13 +0,0 @@
class Attendance < ApplicationRecord
belongs_to :lecture
enum :kind, [
:concurrent,
:catchup
]
def duration
toggl_data['time_entries'].sum { |entry| entry['seconds'] }
.seconds
end
end
-1
View File
@@ -1,6 +1,5 @@
class Lecture < ApplicationRecord
belongs_to :course
has_one :attendance, dependent: :destroy
has_one :recording, dependent: :nullify
has_many :tracked_time_entries, dependent: :destroy