Sha256: 222325b9590616527dde155e7f384474090da20c62f7d2ab38c335e76cbe3544
Contents?: true
Size: 643 Bytes
Versions: 9
Compression:
Stored size: 643 Bytes
Contents
class Usuario < ActiveRecord::Base # Include default devise modules. Others available are: # :confirmable, :lockable, :timeoutable and :omniauthable devise :database_authenticatable, :registerable, :recoverable, :rememberable, :trackable, :validatable belongs_to :papel validates_presence_of :nome, :email def to_s nome end def self.params_permitt [:password, :password_confirmation] end def ability @ability ||= Ability.new(self) end def self.current return Thread.current[:current_usuario] end def self.current=(usuario) Thread.current[:current_usuario] = usuario end end
Version data entries
9 entries across 9 versions & 1 rubygems