hubfeenix.fi/app/models/member.rb

17 lines
435 B
Ruby
Raw Normal View History

2022-12-20 16:05:26 +01:00
class Member < ApplicationRecord
2022-12-20 16:29:05 +01:00
# Include default devise modules. Others available are:
# , :lockable, :timeoutable, :trackable and :omniauthable
devise :database_authenticatable, :registerable,:confirmable,
:recoverable, :rememberable, :validatable
2022-12-22 15:45:55 +01:00
2022-12-25 16:37:22 +01:00
mount_uploader :picture, PictureUploader
has_many :entities
2023-01-15 13:52:40 +01:00
has_one :teacher
2022-12-22 15:45:55 +01:00
def admin?
2023-01-15 13:52:40 +01:00
email == "torsten@villataika.fi"
2022-12-22 15:45:55 +01:00
end
2023-01-15 13:52:40 +01:00
alias :admin :admin?
2022-12-20 16:05:26 +01:00
end