BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
b63c08b2
Commit
b63c08b2
authored
Aug 25, 2017
by
Rubén Dávila
Committed by
Mike Greiling
Aug 26, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Build Project in context of Namespace if available
parent
b7b49c4a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
projects_controller.rb
app/controllers/projects_controller.rb
+10
-1
No files found.
app/controllers/projects_controller.rb
View file @
b63c08b2
...
...
@@ -3,6 +3,7 @@ class ProjectsController < Projects::ApplicationController
include
ExtractsPath
before_action
:authenticate_user!
,
except:
[
:index
,
:show
,
:activity
,
:refs
]
before_action
:namespace
,
only:
[
:new
]
before_action
:project
,
except:
[
:index
,
:new
,
:create
]
before_action
:repository
,
except:
[
:index
,
:new
,
:create
]
before_action
:assign_ref_vars
,
only:
[
:show
],
if: :repo_exists?
...
...
@@ -20,7 +21,7 @@ class ProjectsController < Projects::ApplicationController
end
def
new
@project
=
Project
.
new
build_project
end
def
edit
...
...
@@ -395,4 +396,12 @@ class ProjectsController < Projects::ApplicationController
def
project_export_enabled
render_404
unless
current_application_settings
.
project_export_enabled?
end
def
namespace
@namespace
||=
Namespace
.
find
(
params
[
:namespace_id
])
if
params
[
:namespace_id
].
present?
end
def
build_project
@project
||=
namespace
?
namespace
.
projects
.
new
:
Project
.
new
end
end
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