File tree 4 files changed +7
-7
lines changed
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
63
63
end
64
64
65
65
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
-
73
66
if MissionControl ::Jobs . applications . empty?
74
67
queue_adapters_by_name = MissionControl ::Jobs . adapters . each_with_object ( { } ) do |adapter , hsh |
75
68
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 52
52
config . solid_queue . connects_to = { database : { writing : :queue } }
53
53
54
54
config . mission_control . jobs . http_basic_auth_enabled = false
55
+ config . mission_control . jobs . base_controller_class = "MyApplicationController"
55
56
56
57
# Silence Solid Queue logging
57
58
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
4
4
test "engine's ApplicationController inherits from host's ApplicationController by default" do
5
5
assert MissionControl ::Jobs ::ApplicationController < ApplicationController
6
6
end
7
+
8
+ test "engine's ApplicationController inherits from configured base_controller_class" do
9
+ assert MissionControl ::Jobs ::ApplicationController < MyApplicationController
10
+ end
7
11
end
You can’t perform that action at this time.
0 commit comments