refactor upload tags report

This commit is contained in:
r888888888
2017-02-28 15:34:40 -08:00
parent 458a9692d6
commit 7f22baa1bc
4 changed files with 8 additions and 3 deletions

View File

@@ -29,7 +29,7 @@ class UploadTagsReport < Post
def uploader_tags_array
@uploader_tags ||= begin
added_tags = []
PostVersion.where(post_id: id, updater_id: uploader_id).each do |version|
PostArchive.where(post_id: id, updater_id: uploader_id).each do |version|
added_tags += version.changes[:added_tags]
end
added_tags.uniq.sort