Module: Alchemy::Solidus::AlchemyUserExtension

Defined in:
lib/alchemy/solidus/alchemy_user_extension.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(klass) ⇒ Object



4
5
6
# File 'lib/alchemy/solidus/alchemy_user_extension.rb', line 4

def self.included(klass)
  klass.include Spree::UserMethods
end

Instance Method Details

#spree_rolesObject



8
9
10
11
12
13
14
# File 'lib/alchemy/solidus/alchemy_user_extension.rb', line 8

def spree_roles
  if admin?
    ::Spree::Role.where(name: 'admin')
  else
    ::Spree::Role.none
  end
end