diff options
author | James Lopez <james@jameslopez.es> | 2016-06-15 17:31:00 +0200 |
---|---|---|
committer | James Lopez <james@jameslopez.es> | 2016-06-15 17:31:00 +0200 |
commit | 4bde59341f6d4679b2eefa2c5e332c33c3c76050 (patch) | |
tree | d9c98b030da720f0d413f6ad5e3066cb67559fdd /app/controllers/import | |
parent | f6896f9381b9d833e0db4d0e5be95f2ffc64561a (diff) | |
download | gitlab-ce-4bde59341f6d4679b2eefa2c5e332c33c3c76050.tar.gz |
lots of refactoring again based on feedback. Changed the UI slightly and also fixed a small bug
Diffstat (limited to 'app/controllers/import')
-rw-r--r-- | app/controllers/import/gitlab_projects_controller.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/app/controllers/import/gitlab_projects_controller.rb b/app/controllers/import/gitlab_projects_controller.rb index d63dd64b728..f99aa490d3e 100644 --- a/app/controllers/import/gitlab_projects_controller.rb +++ b/app/controllers/import/gitlab_projects_controller.rb @@ -3,6 +3,7 @@ class Import::GitlabProjectsController < Import::BaseController def new @namespace_id = project_params[:namespace_id] + @namespace_name = Namespace.find(project_params[:namespace_id]).name @path = project_params[:path] end @@ -23,8 +24,8 @@ class Import::GitlabProjectsController < Import::BaseController ) else redirect_to( - new_project_path, - alert: "Project could not be exported: #{@project.errors.full_messages.join(', ')}" + new_import_gitlab_project_path, + alert: "Project could not be imported: #{@project.errors.full_messages.join(', ')}" ) end end @@ -32,7 +33,7 @@ class Import::GitlabProjectsController < Import::BaseController private def file_is_valid? - project_params[:file].respond_to?(:read) + project_params[:file] && project_params[:file].respond_to?(:read) end def verify_gitlab_project_import_enabled |