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
Léo-Paul Géneau
gitlab-ce
Commits
a42c548a
Commit
a42c548a
authored
9 years ago
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use File.join instead of Rails.root.join in HelpController
parent
20491498
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
app/controllers/help_controller.rb
app/controllers/help_controller.rb
+4
-2
No files found.
app/controllers/help_controller.rb
View file @
a42c548a
...
...
@@ -10,7 +10,8 @@ class HelpController < ApplicationController
respond_to
do
|
format
|
format
.
any
(
:markdown
,
:md
,
:html
)
do
path
=
Rails
.
root
.
join
(
'doc'
,
@category
,
"
#{
@file
}
.md"
)
# Note: We are purposefully NOT using `Rails.root.join`
path
=
File
.
join
(
Rails
.
root
,
'doc'
,
@category
,
"
#{
@file
}
.md"
)
if
File
.
exist?
(
path
)
@markdown
=
File
.
read
(
path
)
...
...
@@ -24,7 +25,8 @@ class HelpController < ApplicationController
# Allow access to images in the doc folder
format
.
any
(
:png
,
:gif
,
:jpeg
)
do
path
=
Rails
.
root
.
join
(
'doc'
,
@category
,
"
#{
@file
}
.
#{
params
[
:format
]
}
"
)
# Note: We are purposefully NOT using `Rails.root.join`
path
=
File
.
join
(
Rails
.
root
,
'doc'
,
@category
,
"
#{
@file
}
.
#{
params
[
:format
]
}
"
)
if
File
.
exist?
(
path
)
send_file
(
path
,
disposition:
'inline'
)
...
...
This diff is collapsed.
Click to expand it.
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