Module: Challah::UserAttributeable

Extended by:
ActiveSupport::Concern
Included in:
Userable
Defined in:
lib/challah/concerns/user/attributeable.rb

Instance Method Summary collapse

Instance Method Details

#nameObject

First name and last name together



15
16
17
# File 'lib/challah/concerns/user/attributeable.rb', line 15

def name
  "#{ first_name } #{ last_name }".strip
end

#small_nameObject

shortened name, just includes the first name and last initial



20
21
22
# File 'lib/challah/concerns/user/attributeable.rb', line 20

def small_name
  "#{ first_name.to_s.titleize } #{ last_name.to_s.first.upcase }."
end

#valid_session?Boolean

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.

Returns:

  • (Boolean)


27
28
29
# File 'lib/challah/concerns/user/attributeable.rb', line 27

def valid_session?
  true
end