Sha256: d500309dc11bb1b9f6f7059916221a660b84967678dd0264d419b3bfbc412298
Contents?: true
Size: 428 Bytes
Versions: 11
Compression:
Stored size: 428 Bytes
Contents
class User < ApplicationRecord attr_accessor :admin # Include default devise modules. Others available are: # :confirmable, :lockable, :timeoutable, :trackable and :omniauthable devise :database_authenticatable, :registerable, :recoverable, :rememberable, :validatable def admin? true end def ban! update_columns(is_baned: true) end def unban! update_columns(is_baned: false) end end
Version data entries
11 entries across 11 versions & 1 rubygems