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
50d29b6b
Commit
50d29b6b
authored
Nov 26, 2018
by
Toon Claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add inverse_of:
parent
4c1c6d44
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
app/models/project.rb
app/models/project.rb
+1
-1
app/models/project_repository.rb
app/models/project_repository.rb
+1
-1
No files found.
app/models/project.rb
View file @
50d29b6b
...
...
@@ -189,7 +189,7 @@ class Project < ActiveRecord::Base
has_one
:import_state
,
autosave:
true
,
class_name:
'ProjectImportState'
,
inverse_of: :project
has_one
:import_export_upload
,
dependent: :destroy
# rubocop:disable Cop/ActiveRecordDependent
has_one
:project_repository
has_one
:project_repository
,
inverse_of: :project
# Merge Requests for target project should be removed with it
has_many
:merge_requests
,
foreign_key:
'target_project_id'
,
inverse_of: :target_project
...
...
app/models/project_repository.rb
View file @
50d29b6b
...
...
@@ -3,7 +3,7 @@
class
ProjectRepository
<
ActiveRecord
::
Base
include
RepositoryOnShard
belongs_to
:project
belongs_to
:project
,
inverse_of: :project_repository
class
<<
self
def
find_project
(
disk_path
)
...
...
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