Skip to content

Commit edb56da

Browse files
authored
Merge pull request #2 from kadru/disable-loading-panel-paths
Do not penalize app boot if command deck is disabled.
2 parents 29ad601 + 6ae7166 commit edb56da

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

lib/command_deck/engine.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ class Engine < ::Rails::Engine
99
isolate_namespace CommandDeck
1010

1111
initializer "command_deck.add_autoload_paths", before: :set_autoload_paths do |app|
12+
next unless ENV.fetch("COMMAND_DECK_ENABLED", "false") == "true"
13+
1214
Engine.discover_panel_paths.each do |path|
1315
app.config.autoload_paths << path.to_s unless app.config.autoload_paths.include?(path.to_s)
1416
end

0 commit comments

Comments
 (0)