sarting to generalize profiles
This commit is contained in:
@ -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"
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user