diff options
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 b22280d2fd2..2958367e0f8 100644 --- a/app/controllers/help_controller.rb +++ b/app/controllers/help_controller.rb @@ -1,4 +1,15 @@ class HelpController < ApplicationController def index end + + def api + @category = params[:category] + @category = "README" if @category.blank? + + if File.exists?(Rails.root.join('doc', 'api', @category + '.md')) + render 'api' + else + not_found! + end + end end |