From fd476cf62013e49acf23a301b841e7c09197e9ae Mon Sep 17 00:00:00 2001 From: Job van der Voort Date: Fri, 18 Apr 2014 17:21:21 +0200 Subject: render items from doc --- app/controllers/help_controller.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'app/controllers/help_controller.rb') 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 -- cgit v1.2.1