mirror of
https://github.com/rickbarrette/simple-aircraft-manager-rails.git
synced 2026-11-17 23:50:36 -05:00
- 16 Markdown pages covering every area for pilots, owners, mechanics and admins, readable on GitHub - /help renders them with a page list; links between pages work in both places; only listed pages can be opened - The electronic records instructions (AC 120-78B user instructions) are now the guide's records page, also used as the procedures appendix - Help link in the main menu Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
11 lines
428 B
Ruby
11 lines
428 B
Ruby
module HelpHelper
|
|
def help_page_url_for(slug, anchor = nil)
|
|
slug == "README" ? help_path(anchor: anchor) : help_page_path(slug, anchor: anchor)
|
|
end
|
|
|
|
def guide_html(page, links: true, title: true)
|
|
html = HelpGuide.html(page, title: title, link: (links ? method(:help_page_url_for) : nil))
|
|
tag.div(html.html_safe, class: "markdown guide") # rubocop:disable Rails/OutputSafety -- sanitized in HelpGuide
|
|
end
|
|
end
|