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
ce0102d8
Commit
ce0102d8
authored
Apr 25, 2017
by
Bob Van Landuyt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove dependecy on `User`
parent
99a03fd6
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
20 deletions
+0
-20
lib/gitlab/database/rename_reserved_paths_migration/v1/migration_classes.rb
...e/rename_reserved_paths_migration/v1/migration_classes.rb
+0
-20
No files found.
lib/gitlab/database/rename_reserved_paths_migration/v1/migration_classes.rb
View file @
ce0102d8
...
...
@@ -30,26 +30,8 @@ module Gitlab
def
prepare_route
route
||
build_route
(
source:
self
)
route
.
path
=
build_full_path
route
.
name
=
build_full_name
@full_path
=
nil
@full_name
=
nil
end
def
build_full_name
if
parent
&&
name
parent
.
human_name
+
' / '
+
name
else
name
end
end
def
human_name
owner
&
.
name
end
end
class
User
<
ActiveRecord
::
Base
self
.
table_name
=
'users'
end
class
Namespace
<
ActiveRecord
::
Base
...
...
@@ -61,8 +43,6 @@ module Gitlab
has_many
:children
,
class_name:
"
#{
MigrationClasses
.
name
}
::Namespace"
,
foreign_key: :parent_id
belongs_to
:owner
,
class_name:
"
#{
MigrationClasses
.
name
}
::User"
# Overridden to have the correct `source_type` for the `route` relation
def
self
.
name
...
...
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