Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Tatuya Kamada
gitlab-ce
Commits
6bd9a9fb
Commit
6bd9a9fb
authored
Oct 17, 2015
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Set vars used by tree view in project show action.
parent
6f085653
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
app/controllers/projects_controller.rb
app/controllers/projects_controller.rb
+8
-4
No files found.
app/controllers/projects_controller.rb
View file @
6bd9a9fb
class
ProjectsController
<
ApplicationController
include
ExtractsPath
prepend_before_filter
:render_go_import
,
only:
[
:show
]
skip_before_action
:authenticate_user!
,
only:
[
:show
,
:activity
]
before_action
:project
,
except:
[
:new
,
:create
]
before_action
:repository
,
except:
[
:new
,
:create
]
before_action
:assign_ref_vars
,
:tree
,
only:
[
:show
]
# Authorize
before_action
:authorize_admin_project!
,
only:
[
:edit
,
:update
,
:destroy
,
:transfer
,
:archive
,
:unarchive
]
...
...
@@ -89,10 +92,7 @@ class ProjectsController < ApplicationController
if
current_user
@membership
=
@project
.
project_member_by_id
(
current_user
.
id
)
end
@ref
=
"master"
@id
=
"master"
@commit
=
@project
.
repository
.
commit
(
@ref
)
@tree
=
@project
.
repository
.
tree
(
@commit
.
id
)
render
:show
end
else
...
...
@@ -228,4 +228,8 @@ class ProjectsController < ApplicationController
render
"go_import"
,
layout:
false
end
def
get_id
project
.
repository
.
root_ref
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