gitlab-org--gitlab-foss/app/controllers/help_controller.rb
Dmitriy Zaporozhets 68d146b4a6 Improve api docs
2013-06-06 13:19:23 +03:00

15 lines
287 B
Ruby

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