diff options
author | Job van der Voort <job@gitlab.com> | 2014-04-18 19:21:21 +0400 |
---|---|---|
committer | Marin Jankovski <marin@gitlab.com> | 2014-05-29 10:44:25 +0400 |
commit | fd476cf62013e49acf23a301b841e7c09197e9ae (patch) | |
tree | 78f2d32fc3beb8917c4097e30c1fc17294cb39db /app/controllers/help_controller.rb | |
parent | e61e3eaadb7f0c7c106b72d1325437e7743a2027 (diff) |
render items from doc
Diffstat (limited to 'app/controllers/help_controller.rb')
-rw-r--r-- | app/controllers/help_controller.rb | 11 |
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 |