Sha256: ff79eeebebdefedd008cdb171c173756201c44ddf6591146904539b42652f83c

Contents?: true

Size: 1.21 KB

Versions: 1

Compression:

Stored size: 1.21 KB

Contents

alchemy_module = {
  engine_name: 'spree',
  name: 'solidus',
  navigation: {
    controller: '/spree/admin/orders',
    action: 'index',
    name: 'Store',
    icon: 'shopping-cart-line',
    data: { turbolinks: false },
    sub_navigation: [
      {
        controller: '/spree/admin/orders',
        action: 'index',
        name: 'Orders'
      },
      {
        controller: '/spree/admin/products',
        action: 'index',
        name: 'Products'
      },
      {
        controller: '/spree/admin/promotions',
        action: 'index',
        name: 'Promotions'
      },
      {
        controller: '/spree/admin/stock_items',
        action: 'index',
        name: 'Stock'
      }
    ]
  }
}

if defined?(Spree::Auth::Engine)
  alchemy_module[:navigation][:sub_navigation].push(
    {
      controller: '/spree/admin/users',
      action: 'index',
      name: 'Users'
    }
  )
  Alchemy.user_class_name = 'Spree::User'
  Alchemy.current_user_method = :spree_current_user

  if Alchemy.respond_to?(:logout_method)
    Rails.application.config.after_initialize do
      Alchemy.logout_method = Devise.sign_out_via
    end
  end
end

Rails.application.config.after_initialize do
  Alchemy::Modules.register_module(alchemy_module)
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
alchemy-solidus-7.1.0 config/initializers/alchemy.rb