Merge pull request #3989 from evazion/fix-3987

Wiki pages: convert other_names column to array (#3987)
This commit is contained in:
Albert Yi
2018-11-19 16:23:32 -08:00
committed by GitHub
27 changed files with 238 additions and 181 deletions

View File

@@ -187,7 +187,7 @@ module Sources
def translate_tag(untranslated_tag)
return [] if untranslated_tag.blank?
translated_tag_names = WikiPage.active.other_names_equal(untranslated_tag).uniq.pluck(:title)
translated_tag_names = WikiPage.active.other_names_include(untranslated_tag).uniq.pluck(:title)
translated_tag_names = TagAlias.to_aliased(translated_tag_names)
translated_tags = Tag.where(name: translated_tag_names)