Skip to content

Commit

Permalink
Load Base Controller Extension when autoloading
Browse files Browse the repository at this point in the history
Let's use Zeitwerk to lazy load our extension.
  • Loading branch information
mamhoff committed Nov 21, 2024
1 parent 9ae12c0 commit 30e8f2e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/alchemy/devise/engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ class Engine < ::Rails::Engine
end

config.to_prepare do
require_relative "../../../app/controllers/alchemy/base_controller_extension"
Rails.autoloaders.main.on_load("Alchemy::BaseController") do
Alchemy::BaseControllerExtension
end
end
end
end
Expand Down

0 comments on commit 30e8f2e

Please sign in to comment.