Some initial UI work
This commit is contained in:
@@ -1,2 +1,3 @@
|
||||
class Course < ApplicationRecord
|
||||
has_many :lectures
|
||||
end
|
||||
|
||||
@@ -3,9 +3,13 @@ class Lecture < ApplicationRecord
|
||||
|
||||
enum :status, [
|
||||
:future,
|
||||
:live,
|
||||
:attended,
|
||||
:watched,
|
||||
:happening_now,
|
||||
:attended_in_person,
|
||||
:watched_recording,
|
||||
:missed,
|
||||
]
|
||||
|
||||
def week_number
|
||||
((start_time.beginning_of_week - Time.new('2023-10-02')) / 1.week).floor
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user