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

Do not require `belongs_to` associations to be present by default

Christophe Bliard2671a4500b57
diff --git a/config/application.rb b/config/application.rb
index bc711708ab1..1d9f183ed37 100644
--- a/config/application.rb
+++ b/config/application.rb
@@ -64,6 +64,11 @@ module OpenProject
# https://community.openproject.org/wp/45463 for details.
config.load_defaults 5.0
+ # Do not require `belongs_to` associations to be present by default.
+ # Rails 5.0+ default is true. Because of history, lots of tests fail when
+ # set to true.
+ config.active_record.belongs_to_required_by_default = false
+
# Use new connection handling API. For most applications this won't have any
# effect. For applications using multiple databases, this new API provides
# support for granular connection swapping.