タグ “廃止” 追加 (#378) (#379)

Reviewed-on: #379
Co-authored-by: miteruzo <miteruzo@naver.com>
Co-committed-by: miteruzo <miteruzo@naver.com>
このコミットはPull リクエスト #379 でマージされました.
このコミットが含まれているのは:
2026-06-22 08:40:06 +09:00
committed by みてるぞ
コミット ec2b3d2254
51個のファイルの変更1095行の追加100行の削除
+3 -2
ファイルの表示
@@ -1,6 +1,6 @@
module Similarity
class Calc
def self.call model, tgt
def self.call model, tgt, scope: nil
similarity_model = "#{ model.name }Similarity".constantize
# 最大保存件数
@@ -8,7 +8,8 @@ module Similarity
similarity_model.delete_all
posts = model.includes(tgt).select(:id).to_a
scope ||= model.all
posts = scope.includes(tgt).select(:id).to_a
tag_ids = { }
tag_cnts = { }
+1
ファイルの表示
@@ -16,6 +16,7 @@ class TagVersionRecorder < VersionRecorder
def snapshot_attributes
{ name: @record.name,
category: @record.category,
deprecated_at: @record.deprecated_at,
aliases: @record.snapshot_aliases.join(' '),
parent_tag_ids: @record.snapshot_parent_tag_ids.join(' ') }
end