20 lines
376 B
Ruby
20 lines
376 B
Ruby
class Profile < ApplicationRecord
|
|
belongs_to :member
|
|
has_many :events
|
|
|
|
validates :name , presence: true
|
|
validates :kind , presence: true
|
|
validates :bio , presence: true
|
|
validates :picture , presence: true
|
|
|
|
mount_uploader :picture, PictureUploader
|
|
|
|
def self.types
|
|
["member" , "artist" , "teacher"]
|
|
end
|
|
|
|
def Kind
|
|
self.kind.capitalize
|
|
end
|
|
end
|