Some initial UI work

This commit is contained in:
2023-09-29 18:53:43 +01:00
parent 376e80e385
commit d14903fcb4
8 changed files with 53 additions and 38 deletions
+1
View File
@@ -1,2 +1,3 @@
class Course < ApplicationRecord
has_many :lectures
end
+7 -3
View File
@@ -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