Skip to content

Commit 599d885

Browse files
committed
Fix code reloading in development mode
ActionDispatch::Callbacks.to_prepare reloads code on every requests, which is the desired behaviour in development mode. The other version introduced by b1d89ee only reloads code when Rails configures itself. Hence, when an other plugin patches the same classes/modules, the patches introduced by this plugin disappear so everything is broken in development mode.
1 parent 2c5d065 commit 599d885

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: init.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
require 'omniauth/dynamic_full_host'
66

77
# Patches to existing classes/modules
8-
Rails.application.config.to_prepare do
8+
ActionDispatch::Callbacks.to_prepare do
99
require_dependency 'redmine_omniauth_cas/account_helper_patch'
1010
require_dependency 'redmine_omniauth_cas/account_controller_patch'
1111
end

0 commit comments

Comments
 (0)