Fix #4629: Tag renames/aliases should also modify pool descriptions.

This commit is contained in:
evazion
2022-01-15 20:30:51 -06:00
parent 33103f6dc4
commit 5bec0aa147
4 changed files with 19 additions and 7 deletions

View File

@@ -254,4 +254,10 @@ class Pool < ApplicationRecord
errors.add(:name, "cannot contain only digits")
end
end
def self.rewrite_wiki_links!(old_name, new_name)
Pool.linked_to(old_name).each do |pool|
pool.lock!.update!(description: DText.rewrite_wiki_links(pool.description, old_name, new_name))
end
end
end