Class: Spree::User

Inherits:
Base
  • Object
show all
Includes:
UserAddress, UserMethods, UserPaymentSource
Defined in:
app/models/spree/user.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.admin_created?Boolean

Returns:

  • (Boolean)


22
23
24
# File 'app/models/spree/user.rb', line 22

def self.admin_created?
  User.admin.exists?
end

Instance Method Details

#admin?Boolean

Returns:

  • (Boolean)


26
27
28
# File 'app/models/spree/user.rb', line 26

def admin?
  has_spree_role?('admin')
end