このコミットが含まれているのは:
2026-10-12 21:34:02 +09:00
コミット 11e6f73287
17個のファイルの変更、524行の追加、22行の削除
+8 -1
ファイルの表示
@@ -53,6 +53,7 @@ class Tag < ApplicationRecord
has_many :tag_versions
has_many :tag_names
has_many :tag_descriptions
attribute :version_no, :integer, default: 1
@@ -98,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