Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
66aef77a
Commit
66aef77a
authored
Dec 07, 2020
by
Dallas Reedy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add explicit inverse_of option to associations
parent
95aad49c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
app/models/experiment.rb
app/models/experiment.rb
+1
-1
app/models/experiment_subject.rb
app/models/experiment_subject.rb
+1
-1
No files found.
app/models/experiment.rb
View file @
66aef77a
...
...
@@ -2,7 +2,7 @@
class
Experiment
<
ApplicationRecord
has_many
:experiment_users
has_many
:experiment_subjects
has_many
:experiment_subjects
,
inverse_of: :experiment
validates
:name
,
presence:
true
,
uniqueness:
true
,
length:
{
maximum:
255
}
...
...
app/models/experiment_subject.rb
View file @
66aef77a
...
...
@@ -3,7 +3,7 @@
class
ExperimentSubject
<
ApplicationRecord
include
::
Gitlab
::
Experimentation
::
GroupTypes
belongs_to
:experiment
belongs_to
:experiment
,
inverse_of: :experiment_subjects
belongs_to
:user
belongs_to
:group
belongs_to
:project
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment