#45 完了
This commit is contained in:
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user