fixes #2920: "Undo" function not working for Post Versions

This commit is contained in:
r888888888
2017-03-09 11:44:28 -08:00
parent 865a2ca165
commit 43f31529d7
3 changed files with 111 additions and 2 deletions

View File

@@ -205,8 +205,8 @@ class PostArchive < ActiveRecord::Base
end
def undo
added = changes[:added_tags_with_fields] - changes[:obsolete_added_tags]
removed = changes[:removed_tags_with_fields] - changes[:obsolete_removed_tags]
added = changes[:added_tags] - changes[:obsolete_added_tags]
removed = changes[:removed_tags] - changes[:obsolete_removed_tags]
added.each do |tag|
if tag =~ /^source:/