sarting to generalize profiles

This commit is contained in:
2023-01-16 00:17:22 +02:00
parent 485c0475b7
commit 4ffc6e3c85
26 changed files with 165 additions and 207 deletions

View File

@ -7,7 +7,7 @@ class Member < ApplicationRecord
mount_uploader :picture, PictureUploader
has_many :entities
has_one :teacher
has_one :profile
def admin?
email == "torsten@villataika.fi"

View File

@ -1,7 +1,8 @@
class Teacher < ApplicationRecord
class Profile < ApplicationRecord
belongs_to :member
validates :name , presence: true
validates :kind , presence: true
validates :bio , presence: true
validates :picture , presence: true