Remove attendances model
This commit is contained in:
@@ -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,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
|
||||
|
||||
Reference in New Issue
Block a user