summaryrefslogtreecommitdiff
path: root/app/controllers/projects_controller.rb
diff options
context:
space:
mode:
authorMałgorzata Ksionek <meksionek@gmail.com>2019-04-16 10:20:57 +0200
committerMałgorzata Ksionek <meksionek@gmail.com>2019-04-16 10:20:57 +0200
commit303ec92ab92942e067f8bc95de27e85b579580c4 (patch)
tree1a5cb9bee535486a9b880a63d2acb6d9f7d49914 /app/controllers/projects_controller.rb
parent224916f843d3cc7beff383217d199a8cabfec263 (diff)
downloadgitlab-ce-303ec92ab92942e067f8bc95de27e85b579580c4.tar.gz
Update projects controllergroup-project-template-in-paid-features
Diffstat (limited to 'app/controllers/projects_controller.rb')
-rw-r--r--app/controllers/projects_controller.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb
index 48f4d7a586d..e88c46144ef 100644
--- a/app/controllers/projects_controller.rb
+++ b/app/controllers/projects_controller.rb
@@ -36,10 +36,10 @@ class ProjectsController < Projects::ApplicationController
# rubocop: disable CodeReuse/ActiveRecord
def new
- namespace = Namespace.find_by(id: params[:namespace_id]) if params[:namespace_id]
- return access_denied! if namespace && !can?(current_user, :create_projects, namespace)
+ @namespace = Namespace.find_by(id: params[:namespace_id]) if params[:namespace_id]
+ return access_denied! if @namespace && !can?(current_user, :create_projects, @namespace)
- @project = Project.new(namespace_id: namespace&.id)
+ @project = Project.new(namespace_id: @namespace&.id)
end
# rubocop: enable CodeReuse/ActiveRecord