Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJob van der Voort <job@gitlab.com>2014-04-18 19:21:21 +0400
committerMarin Jankovski <marin@gitlab.com>2014-05-29 10:44:25 +0400
commitfd476cf62013e49acf23a301b841e7c09197e9ae (patch)
tree78f2d32fc3beb8917c4097e30c1fc17294cb39db /app/controllers/help_controller.rb
parente61e3eaadb7f0c7c106b72d1325437e7743a2027 (diff)
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