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

Make rubocop happier

Christophe Bliard590fa591aef9
diff --git a/app/models/principal.rb b/app/models/principal.rb
index 0242958910a..4c0b97d6781 100644
--- a/app/models/principal.rb
+++ b/app/models/principal.rb
@@ -54,6 +54,8 @@ class Principal < ApplicationRecord
.order(Arel.sql('projects.name ASC'))
# haven't been able to produce the order using hashes
},
+ inverse_of: :principal,
+ dependent: :nullify,
class_name: 'Member',
foreign_key: 'user_id'
has_many :projects, through: :memberships