Module: Spree::AdminUserMethods

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

Defined Under Namespace

Modules: DeviseNotifications

Constant Summary

Constants included from PrefixedId

PrefixedId::SQIDS

Instance Method Summary collapse

Methods included from PrefixedId

#assign_attributes, decode_prefixed_id, #prefixed_id, prefixed_id?, #to_param

Instance Method Details

#can_be_deleted?Boolean

Returns:

  • (Boolean)


69
70
71
# File 'app/models/concerns/spree/admin_user_methods.rb', line 69

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)


75
76
77
# File 'app/models/concerns/spree/admin_user_methods.rb', line 75

def full_name
  name&.full
end