Class: Identizer::Handlers::Docs
- Inherits:
-
Base
- Object
- Base
- Identizer::Handlers::Docs
show all
- Defined in:
- lib/identizer/handlers/docs.rb
Overview
Bundled, read-only documentation pages under /docs.
Instance Method Summary
collapse
Methods inherited from Base
#initialize
Methods included from Responses
#amz_json, #escape_html, #html, #json, #no_content, #not_found, #notice_page, #redirect, #xml
Instance Method Details
#index(request) ⇒ Object
7
8
9
|
# File 'lib/identizer/handlers/docs.rb', line 7
def index(request)
page("docs/index", request, nav: :docs, title: "Docs", pages: Identizer::Docs::PAGES)
end
|
#show(request, slug) ⇒ Object
11
12
13
14
15
16
|
# File 'lib/identizer/handlers/docs.rb', line 11
def show(request, slug)
meta = Identizer::Docs.find(slug)
return not_found("No doc page: #{slug}") unless meta
page("docs/#{slug}", request, nav: :docs, title: meta[:title], config: config)
end
|