File tree Expand file tree Collapse file tree 4 files changed +7
-7
lines changed Expand file tree Collapse file tree 4 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -63,13 +63,6 @@ class Engine < ::Rails::Engine
6363 end
6464
6565 config . after_initialize do |app |
66- unless app . config . eager_load
67- # When loading classes lazily (development), we want to make sure
68- # the base host +ApplicationController+ class is loaded when loading the
69- # Engine's +ApplicationController+, or it will fail to load the class.
70- MissionControl ::Jobs . base_controller_class . constantize
71- end
72-
7366 if MissionControl ::Jobs . applications . empty?
7467 queue_adapters_by_name = MissionControl ::Jobs . adapters . each_with_object ( { } ) do |adapter , hsh |
7568 hsh [ adapter ] = ActiveJob ::QueueAdapters . lookup ( adapter ) . new
Original file line number Diff line number Diff line change 1+ class MyApplicationController < ApplicationController
2+ end
Original file line number Diff line number Diff line change 5252 config . solid_queue . connects_to = { database : { writing : :queue } }
5353
5454 config . mission_control . jobs . http_basic_auth_enabled = false
55+ config . mission_control . jobs . base_controller_class = "MyApplicationController"
5556
5657 # Silence Solid Queue logging
5758 config . solid_queue . logger = ActiveSupport ::Logger . new ( nil )
Original file line number Diff line number Diff line change @@ -4,4 +4,8 @@ class MissionControl::Jobs::BaseApplicationControllerTest < ActiveSupport::TestC
44 test "engine's ApplicationController inherits from host's ApplicationController by default" do
55 assert MissionControl ::Jobs ::ApplicationController < ApplicationController
66 end
7+
8+ test "engine's ApplicationController inherits from configured base_controller_class" do
9+ assert MissionControl ::Jobs ::ApplicationController < MyApplicationController
10+ end
711end
You can’t perform that action at this time.
0 commit comments