タグ説明移行 (#422) (#423)

Reviewed-on: #423
Co-authored-by: miteruzo <miteruzo@naver.com>
このコミットはプルリクエスト #423 でマージされました。
このコミットが含まれているのは:
2026-10-05 01:22:54 +09:00
committed by みてるぞ
コミット 4a6ace3322
25個のファイルの変更、1746行の追加、180行の削除
+15
ファイルの表示
@@ -10,6 +10,21 @@ module WikiPageRepr
wiki_page.as_json(BASE)
end
def tag_description description
tag = description.tag
{ 'id' => description.id,
'tag_name_id' => tag.tag_name('ja')&.id,
'body' => description.body,
'created_user_id' => description.created_by_user_id,
'updated_user_id' => description.updated_by_user_id,
'created_at' => description.created_at,
'updated_at' => description.updated_at,
'discarded_at' => nil,
'version_no' => description.version_no,
'title' => tag.name('ja'),
'deprecated_at' => tag.deprecated_at }
end
def many wiki_pages
wiki_pages.map { |p| base(p) }
end