diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-12-01 12:10:25 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-12-01 12:10:25 +0300 |
commit | 7bc1ee0bcb9cefaf788aa0b93383b7347e9010b0 (patch) | |
tree | 4cd125d7c55603ae87b2ca93b8ef89d71c2c5ef8 /app/models/bulk_imports/entity.rb | |
parent | 9b646e9297a1d9bcc7397c76010011f56df1579d (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/bulk_imports/entity.rb')
-rw-r--r-- | app/models/bulk_imports/entity.rb | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/app/models/bulk_imports/entity.rb b/app/models/bulk_imports/entity.rb index 159617bc0a9..33ce4686e27 100644 --- a/app/models/bulk_imports/entity.rb +++ b/app/models/bulk_imports/entity.rb @@ -20,8 +20,6 @@ class BulkImports::Entity < ApplicationRecord self.table_name = 'bulk_import_entities' - EXPORT_RELATIONS_URL = '/%{resource}/%{full_path}/export_relations' - belongs_to :bulk_import, optional: false belongs_to :parent, class_name: 'BulkImports::Entity', optional: true @@ -112,14 +110,22 @@ class BulkImports::Entity < ApplicationRecord entity_type.pluralize end + def base_resource_url_path + "/#{pluralized_name}/#{encoded_source_full_path}" + end + def export_relations_url_path - @export_relations_url_path ||= EXPORT_RELATIONS_URL % { resource: pluralized_name, full_path: encoded_source_full_path } + "#{base_resource_url_path}/export_relations" end def relation_download_url_path(relation) "#{export_relations_url_path}/download?relation=#{relation}" end + def wikis_url_path + "#{base_resource_url_path}/wikis" + end + def project? source_type == 'project_entity' end |