ヘルプを Wiki から分離 (#424) (#430)

画面上でのテストは完了.
移行にす早さが求められるので,準備ができたらマージする.

Reviewed-on: #430
Co-authored-by: miteruzo <miteruzo@naver.com>
このコミットはプルリクエスト #430 でマージされました。
このコミットが含まれているのは:
2026-10-13 12:25:11 +09:00
committed by みてるぞ
コミット e44887cf15
85個のファイルの変更、4126行の追加、764行の削除
+2
ファイルの表示
@@ -1,4 +1,6 @@
class ExternalTag < ApplicationRecord
before_create { SharedResourceIdAllocator.assign!(self) }
enum :platform, nico: 'nico'
validates :platform, presence: true, inclusion: { in: ExternalTag.platforms.keys }
+10 -1
ファイルの表示
@@ -2,6 +2,8 @@ require 'set'
class Tag < ApplicationRecord
before_create { SharedResourceIdAllocator.assign!(self) }
class NicoTagNormalisationError < ArgumentError
;
end
@@ -51,6 +53,7 @@ class Tag < ApplicationRecord
has_many :tag_versions
has_many :tag_names
has_many :tag_descriptions
attribute :version_no, :integer, default: 1
@@ -96,7 +99,13 @@ class Tag < ApplicationRecord
def deprecated? = deprecated_at?
def has_wiki = wiki_page.present?
def has_description? language_code:
if tag_descriptions.loaded?
tag_descriptions.any? { _1.language_code == language_code }
else
tag_descriptions.exists?(language_code:)
end
end
def material_id = materials.first&.id
+2
ファイルの表示
@@ -1,3 +1,5 @@
class TagDescription < ApplicationRecord
before_create { SharedResourceIdAllocator.assign!(self) }
belongs_to :tag
end
+2
ファイルの表示
@@ -1,4 +1,6 @@
class TagGroup < ApplicationRecord
before_create { SharedResourceIdAllocator.assign!(self) }
belongs_to :created_by_user, class_name: 'User', optional: true
belongs_to :updated_by_user, class_name: 'User', optional: true