このコミットが含まれているのは:
2026-06-22 07:18:21 +09:00
コミット b8126eeea9
6個のファイルの変更81行の追加14行の削除
+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 = { }