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

@ -77,8 +77,8 @@ module PrettyText
if !is_tag && category = Category.query_from_hashtag_slug(text)
[category.url_with_id, text]
elsif is_tag && tag = TopicCustomField.find_by(name: DiscourseTagging::TAGS_FIELD_NAME, value: text.gsub!("#{tag_postfix}", ''))
["#{Discourse.base_url}/tags/#{tag.value}", text]
elsif is_tag && tag = Tag.find_by_name(text.gsub!("#{tag_postfix}", ''))
["#{Discourse.base_url}/tags/#{tag.name}", text]
else
nil
end