diff --git a/init.rb b/init.rb index 2b2944e..54d5222 100644 --- a/init.rb +++ b/init.rb @@ -23,8 +23,14 @@ $LOAD_PATH.unshift "#{File.dirname(__FILE__)}/lib" -Rails.configuration.to_prepare do - WikiExtensionsProjectsHelperPatch.apply +if Rails.version > '6.0' + Rails.application.config.after_initialize do + WikiExtensionsProjectsHelperPatch.apply + end +else + Rails.configuration.to_prepare do + WikiExtensionsProjectsHelperPatch.apply + end end require_dependency 'wiki_extensions_notifiable_patch'