This commit is contained in:
2025-07-22 00:44:58 +09:00
parent da594e6637
commit 91a393d20c
+12
View File
@@ -0,0 +1,12 @@
namespace :nico do
desc 'ニコタグ連携'
task link: :environment do
Post.find_each do |post|
tags = post.tags.where(category: 'nico')
tags.each do |tag|
post.tags.concat(tag.linked_tags) if tag.linked_tags.present?
end
post.tags = post.tags.to_a.uniq
end
end
end