Module: Spree::AdminUserMethods

Extended by:
ActiveSupport::Concern
Includes:
PrefixedId, RansackableAttributes, UserRoles
Included in:
LegacyAdminUser
Defined in:
app/models/concerns/spree/admin_user_methods.rb

Constant Summary

Constants included from PrefixedId

PrefixedId::SQIDS

Instance Method Summary collapse

Methods included from PrefixedId

#prefixed_id, #to_param

Instance Method Details

#can_be_deleted?Boolean

Returns:

  • (Boolean)


45
46
47
# File 'app/models/concerns/spree/admin_user_methods.rb', line 45

def can_be_deleted?
  Spree::Store.current.users.where.not(id: id).exists?
end

#full_nameString

Returns the full name of the user

Returns:

  • (String)


51
52
53
# File 'app/models/concerns/spree/admin_user_methods.rb', line 51

def full_name
  name&.full
end