diff options
author | Bob Van Landuyt <bob@gitlab.com> | 2017-04-25 14:32:13 +0200 |
---|---|---|
committer | Bob Van Landuyt <bob@gitlab.com> | 2017-05-01 11:14:24 +0200 |
commit | ce0102d8b752a57131692d5dec620b50b2e76658 (patch) | |
tree | 4305d5216a1894acd7d58bb696b9bb5e96a321df | |
parent | 99a03fd6e912f594f96176f581de47e1731d3459 (diff) | |
download | gitlab-ce-ce0102d8b752a57131692d5dec620b50b2e76658.tar.gz |
Remove dependecy on `User`
-rw-r--r-- | lib/gitlab/database/rename_reserved_paths_migration/v1/migration_classes.rb | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/lib/gitlab/database/rename_reserved_paths_migration/v1/migration_classes.rb b/lib/gitlab/database/rename_reserved_paths_migration/v1/migration_classes.rb index e620b62e2ac..4fdcb682c2f 100644 --- a/lib/gitlab/database/rename_reserved_paths_migration/v1/migration_classes.rb +++ b/lib/gitlab/database/rename_reserved_paths_migration/v1/migration_classes.rb @@ -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 |