Class: SolidusStaticContent::Engine

Inherits:
Rails::Engine
  • Object
show all
Includes:
SolidusSupport::EngineExtensions
Defined in:
lib/solidus_static_content/engine.rb

Class Method Summary collapse

Class Method Details

.activate_menu_itemsObject



27
28
29
30
31
# File 'lib/solidus_static_content/engine.rb', line 27

def self.activate_menu_items
  return if Spree::Backend::Config.menu_items.include?(menu_item)

  Spree::Backend::Config.menu_items << menu_item
end


19
20
21
22
23
24
25
# File 'lib/solidus_static_content/engine.rb', line 19

def self.menu_item
  @menu_item ||= Spree::Backend::Config.class::MenuItem.new(
    [:pages],
    'file-text',
    condition: -> { can?(:admin, Spree::Page) },
  )
end