chore: init commit

in worker.../repo/GITFOLDER.zip is the .git folder.
This commit is contained in:
2026-08-11 14:44:09 -04:00
parent 0012380fd3
commit 2854619bc9
782 changed files with 65944 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
# frozen_string_literal: true
class Teacher < User
attr_accessor :school_id
has_many :teacher_classrooms, dependent: :destroy
has_many :classrooms, through: :teacher_classrooms
before_validation :sync_username_from_email
def display_name
name.presence || email&.split("@")&.first || "Teacher"
end
private
def sync_username_from_email
self.username = email if email.present?
end
end