hubfeenix.fi/app/models/profile.rb

19 lines
355 B
Ruby
Raw Normal View History

2023-01-15 23:17:22 +01:00
class Profile < ApplicationRecord
2023-01-15 13:52:40 +01:00
belongs_to :member
validates :name , presence: true
2023-01-15 23:17:22 +01:00
validates :kind , presence: true
2023-01-15 13:52:40 +01:00
validates :bio , presence: true
validates :picture , presence: true
mount_uploader :picture, PictureUploader
2023-01-16 00:11:05 +01:00
def self.types
["member" , "artist" , "teacher"]
end
def Kind
self.kind.capitalize
end
2023-01-15 13:52:40 +01:00
end