Class: AdminSuite::Engine
- Inherits:
-
Rails::Engine
- Object
- Rails::Engine
- AdminSuite::Engine
- Defined in:
- lib/admin_suite/engine.rb
Class Method Summary collapse
-
.apply_default_portals!(config) ⇒ Object
Applies the engine's built-in default portals, unless the host has explicitly assigned
config.portalsitself (even to{}).
Class Method Details
.apply_default_portals!(config) ⇒ Object
Applies the engine's built-in default portals, unless the host has
explicitly assigned config.portals itself (even to {}). Extracted
from the "admin_suite.configuration" initializer so it is directly
testable without booting a full Rails app.
130 131 132 133 134 135 136 137 138 139 |
# File 'lib/admin_suite/engine.rb', line 130 def self.apply_default_portals!(config) return if config.portals_configured? || config.portals.present? config.send(:default_portals!, { ops: { label: "Ops Portal", icon: "settings", color: :amber, order: 10 }, email: { label: "Email Portal", icon: "inbox", color: :emerald, order: 20 }, ai: { label: "AI Portal", icon: "cpu", color: :cyan, order: 30 }, assistant: { label: "Assistant Portal", icon: "message-circle", color: :violet, order: 40 } }) end |