Sha256: e87a4a5b00ed5809080f28673d55d4d473306e0006e4eedb731389b76c619f39
Contents?: true
Size: 726 Bytes
Versions: 9
Compression:
Stored size: 726 Bytes
Contents
module Challah::User module Attributes # Returns true if this user is active, and should be able to log in. If # the active column is false, the user will not be able to authenticate def active? !!self.active end # First name and last name together def name "#{first_name} #{last_name}".strip end # shortened name, just includes the first name and last initial def small_name "#{first_name.to_s.titleize} #{last_name.to_s.first.upcase}." end # Is this user valid and ready for a user session? # # Override this method if you need to check for a particular configuration on each page request. def valid_session? self.active? end end end
Version data entries
9 entries across 9 versions & 1 rubygems