Fix #3174
This commit is contained in:
@@ -55,7 +55,9 @@ module Sources
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
untranslated_tags.reject! {|x| x.blank?}
|
untranslated_tags.reject! {|x| x.blank?}
|
||||||
WikiPage.other_names_equal(untranslated_tags).map{|wiki_page| [wiki_page.title, wiki_page.category_name]}
|
wikis = WikiPage.title_in(untranslated_tags)
|
||||||
|
wikis += WikiPage.other_names_equal(untranslated_tags)
|
||||||
|
wikis.uniq.map{|wiki_page| [wiki_page.title, wiki_page.category_name]}
|
||||||
end
|
end
|
||||||
|
|
||||||
def to_h
|
def to_h
|
||||||
|
|||||||
@@ -24,6 +24,10 @@ class WikiPage < ApplicationRecord
|
|||||||
where("title = ?", title.mb_chars.downcase.tr(" ", "_"))
|
where("title = ?", title.mb_chars.downcase.tr(" ", "_"))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def title_in(titles)
|
||||||
|
where("title in (?)", titles.map{|x| x.mb_chars.downcase.tr(" ", "_")} )
|
||||||
|
end
|
||||||
|
|
||||||
def active
|
def active
|
||||||
where("is_deleted = false")
|
where("is_deleted = false")
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user