Skip to content

Commit 6f7a94f

Browse files
author
Li Ding
authored
Use action_controller_base hook in initializer (#77)
`action_controller` is called if the controller is an instance of `ActionController::Base` or `ActionController::API`. And, `ActionController::API` don't have `helper_method` method.
1 parent 7530d80 commit 6f7a94f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/inertia_rails/engine.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class Engine < ::Rails::Engine
88
end
99

1010
initializer "inertia_rails.action_controller" do
11-
ActiveSupport.on_load(:action_controller) do
11+
ActiveSupport.on_load(:action_controller_base) do
1212
include ::InertiaRails::Controller
1313
end
1414
end

0 commit comments

Comments
 (0)