mirror of
https://github.com/rickbarrette/simple-aircraft-manager-rails.git
synced 2026-11-17 23:50:36 -05:00
Versions: year.month.release (VERSION) plus build (commit); What's new from CHANGELOG.md
Shown on Admin -> About, in the software history, records package, procedures and sam:doctor; release notes in the app under Help. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
98e943cf0a
commit
8c8e3b7374
16 files changed
+110
-19
No files matched your search
@@ -3,7 +3,7 @@
|
||||
class HelpGuide
|
||||
DIR = Rails.root.join("docs/guide")
|
||||
ORDER = %w[README getting-started profile aircraft flights squawks oil-and-fuel components logbook records
|
||||
inspections ads documents major-records sharing administration].freeze
|
||||
inspections ads documents major-records sharing administration changelog].freeze
|
||||
OPTIONS = {
|
||||
parse: { smart: true },
|
||||
render: { hardbreaks: false, unsafe: false },
|
||||
@@ -18,7 +18,7 @@ class HelpGuide
|
||||
|
||||
def self.find(slug)
|
||||
return unless ORDER.include?(slug.to_s)
|
||||
path = DIR.join("#{slug}.md")
|
||||
path = slug.to_s == "changelog" ? Rails.root.join("CHANGELOG.md") : DIR.join("#{slug}.md")
|
||||
return unless path.file?
|
||||
markdown = path.read
|
||||
Page.new(slug: slug.to_s, title: markdown[/\A# (.+)$/, 1] || slug.to_s.titleize, markdown: markdown)
|
||||
|
||||
Reference in new issue
Block a user