ref: master
app/controllers/public/doc_controller.rb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
class DocController < PublicController include LanguageHelper no_design_blocks before_filter :load_toc def index @index = DocSection.root(language) end def section @section = DocSection.find(params[:section], language) end def topic @section = DocSection.find(params[:section], language) @topic = @section.find(params[:topic]) end rescue_from DocItem::NotFound, :with => :not_found def not_found render_not_found end protected def load_toc @toc = DocSection.root(language).find('toc') end end |