Commit 66aef77a authored by Dallas Reedy's avatar Dallas Reedy

Add explicit inverse_of option to associations

parent 95aad49c
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
class Experiment < ApplicationRecord class Experiment < ApplicationRecord
has_many :experiment_users has_many :experiment_users
has_many :experiment_subjects has_many :experiment_subjects, inverse_of: :experiment
validates :name, presence: true, uniqueness: true, length: { maximum: 255 } validates :name, presence: true, uniqueness: true, length: { maximum: 255 }
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
class ExperimentSubject < ApplicationRecord class ExperimentSubject < ApplicationRecord
include ::Gitlab::Experimentation::GroupTypes include ::Gitlab::Experimentation::GroupTypes
belongs_to :experiment belongs_to :experiment, inverse_of: :experiment_subjects
belongs_to :user belongs_to :user
belongs_to :group belongs_to :group
belongs_to :project belongs_to :project
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment