Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Ensure we reload patches

Oliver Günther44c993c0deb7
diff --git a/config/initializers/10-load_patches.rb b/config/initializers/10-load_patches.rb
index 5237b4a8840..ca74430c372 100644
--- a/config/initializers/10-load_patches.rb
+++ b/config/initializers/10-load_patches.rb
@@ -28,10 +28,11 @@
Rails.application.reloader.to_prepare do
# Do not place any patches within this file. Add a file to lib/open_project/patches
- require "open_project/patches"
+ load File.expand_path("../../lib/open_project/patches.rb", __dir__)
- # Whatever ruby file is placed in lib/open_project/patches is required
+ # Whatever ruby file is placed in lib/open_project/patches is loaded (not required)
+ # to ensure patches are re-applied on each reload
Dir.glob(File.expand_path("../../lib/open_project/patches/*.rb", __dir__)).each do |path|
- require path
+ load path
end
end