Implentation for #2141

This commit is contained in:
Toks
2014-05-22 20:07:15 -04:00
parent 47f56cd19d
commit b18bb73f4b
14 changed files with 96 additions and 5 deletions

View File

@@ -18,12 +18,17 @@ module Sources
end
end
def translated_tags
WikiPage.other_names_match(tags.map(&:first)).map{|wiki_page| [wiki_page.title, wiki_page.category_name]}
end
def to_json
return {
:artist_name => artist_name,
:profile_url => profile_url,
:image_url => image_url,
:tags => tags,
:translated_tags => translated_tags,
:danbooru_name => artist_record.try(:first).try(:name),
:danbooru_id => artist_record.try(:first).try(:id),
:unique_id => unique_id