Class: User

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
lib/generators/ifd_tools/install/templates/models/user.rb

Constant Summary collapse

Roles =
%w(admin super_admin)

Instance Method Summary collapse

Instance Method Details

#display_nameObject



18
19
20
# File 'lib/generators/ifd_tools/install/templates/models/user.rb', line 18

def display_name
  full_name
end

#full_nameObject



14
15
16
# File 'lib/generators/ifd_tools/install/templates/models/user.rb', line 14

def full_name
  "#{first_name} #{last_name}"
end

#password_required?Boolean

Returns:

  • (Boolean)


27
28
29
# File 'lib/generators/ifd_tools/install/templates/models/user.rb', line 27

def password_required?
  new_record? ? false : super
end