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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
5e1c63d3
Commit
5e1c63d3
authored
Sep 05, 2012
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move load_refs out of ApplicationController and into CommitsController
That was the only place it was used.
parent
a9f275bc
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
11 deletions
+13
-11
app/controllers/application_controller.rb
app/controllers/application_controller.rb
+0
-10
app/controllers/commits_controller.rb
app/controllers/commits_controller.rb
+13
-1
No files found.
app/controllers/application_controller.rb
View file @
5e1c63d3
...
...
@@ -120,16 +120,6 @@ class ApplicationController < ActionController::Base
end
end
def
load_refs
if
params
[
:ref
].
blank?
@branch
=
params
[
:branch
].
blank?
?
nil
:
params
[
:branch
]
@tag
=
params
[
:tag
].
blank?
?
nil
:
params
[
:tag
]
@ref
=
@branch
||
@tag
||
@project
.
try
(
:default_branch
)
||
'master'
else
@ref
=
params
[
:ref
]
end
end
def
render_404
render
file:
File
.
join
(
Rails
.
root
,
"public"
,
"404"
),
layout:
false
,
status:
"404"
end
...
...
app/controllers/commits_controller.rb
View file @
5e1c63d3
...
...
@@ -67,4 +67,16 @@ class CommitsController < ApplicationController
filename:
(
@commit
.
id
.
to_s
+
".patch"
)
)
end
protected
def
load_refs
if
params
[
:ref
].
blank?
@branch
=
params
[
:branch
].
blank?
?
nil
:
params
[
:branch
]
@tag
=
params
[
:tag
].
blank?
?
nil
:
params
[
:tag
]
@ref
=
@branch
||
@tag
||
@project
.
try
(
:default_branch
)
||
'master'
else
@ref
=
params
[
:ref
]
end
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