summaryrefslogtreecommitdiff
path: root/app/controllers/help_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/help_controller.rb')
-rw-r--r--app/controllers/help_controller.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/app/controllers/help_controller.rb b/app/controllers/help_controller.rb
index 35ece5b270b..b405cc7e689 100644
--- a/app/controllers/help_controller.rb
+++ b/app/controllers/help_controller.rb
@@ -3,12 +3,12 @@ class HelpController < ApplicationController
end
def show
- category = clean_path_info(path_params[:category])
- file = path_params[:file]
+ @category = clean_path_info(path_params[:category])
+ @file = path_params[:file]
respond_to do |format|
format.any(:markdown, :md, :html) do
- path = Rails.root.join('doc', category, "#{file}.md")
+ path = Rails.root.join('doc', @category, "#{@file}.md")
if File.exist?(path)
@markdown = File.read(path)
@@ -22,7 +22,7 @@ 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]}")
+ path = Rails.root.join('doc', @category, "#{@file}.#{params[:format]}")
if File.exist?(path)
send_file(path, disposition: 'inline')