Use db schema for tags instead of plugin store and custom fields

This commit is contained in:
Neil Lalonde
2016-05-04 14:02:47 -04:00
parent ebd4b45771
commit f13470b96b
33 changed files with 726 additions and 186 deletions

View File

@@ -41,6 +41,7 @@ class PostRevisionSerializer < ApplicationSerializer
end
add_compared_field :wiki
add_compared_field :tags
def previous_hidden
previous["hidden"]
@@ -149,6 +150,10 @@ class PostRevisionSerializer < ApplicationSerializer
}
end
def include_tags_changes?
SiteSetting.tagging_enabled
end
protected
def post
@@ -184,6 +189,10 @@ class PostRevisionSerializer < ApplicationSerializer
end
end
if SiteSetting.tagging_enabled
latest_modifications["tags"] = post.topic.tags.map(&:name)
end
post_revisions << PostRevision.new(
number: post_revisions.last.number + 1,
hidden: post.hidden,