summaryrefslogtreecommitdiff
path: root/app/controllers/help_controller.rb
diff options
context:
space:
mode:
authorJob van der Voort <job@gitlab.com>2014-04-18 17:21:21 +0200
committerMarin Jankovski <marin@gitlab.com>2014-05-29 08:44:25 +0200
commitfd476cf62013e49acf23a301b841e7c09197e9ae (patch)
tree78f2d32fc3beb8917c4097e30c1fc17294cb39db /app/controllers/help_controller.rb
parente61e3eaadb7f0c7c106b72d1325437e7743a2027 (diff)
downloadgitlab-ce-fd476cf62013e49acf23a301b841e7c09197e9ae.tar.gz
render items from doc
Diffstat (limited to 'app/controllers/help_controller.rb')
-rw-r--r--app/controllers/help_controller.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/app/controllers/help_controller.rb b/app/controllers/help_controller.rb
index 051cbdfaf05..a4fcd4b29e8 100644
--- a/app/controllers/help_controller.rb
+++ b/app/controllers/help_controller.rb
@@ -13,6 +13,17 @@ class HelpController < ApplicationController
end
end
+ def show
+ @category = params[:category]
+ @file = params[:file]
+
+ if File.exists?(Rails.root.join('doc', @category, @file + '.md'))
+ render 'show'
+ else
+ not_found!
+ end
+ end
+
def shortcuts
end
end