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
a42c548a
Commit
a42c548a
authored
Aug 18, 2015
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
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
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'
)
...
...
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