This commit is contained in:
2025-06-25 02:52:51 +09:00
parent 5afee2f344
commit 6e6ee73857
7 changed files with 115 additions and 33 deletions
+5
View File
@@ -20,6 +20,7 @@ class WikiPage < ApplicationRecord
idx = vers.find_index { |ver| ver.id == @sha }
@pred = vers[idx + 1]&.id
@succ = idx.positive? ? vers[idx - 1].id : nil
@updated_at = vers[idx].authored_date
@sha
end
@@ -35,6 +36,10 @@ class WikiPage < ApplicationRecord
@succ
end
def updated_at
@updated_at
end
def body
sha = nil unless @page
@page&.raw_data&.force_encoding('UTF-8')