This commit is contained in:
albert
2013-03-19 22:48:13 -07:00
parent 61f8c93944
commit 0495d5c338
6 changed files with 31 additions and 10 deletions

View File

@@ -27,7 +27,7 @@ class Artist < ActiveRecord::Base
u = u.to_escaped_for_sql_like.gsub(/\*/, '%') + '%'
artists += Artist.joins(:urls).where(["artists.is_active = TRUE AND artist_urls.normalized_url LIKE ? ESCAPE E'\\\\'", u]).all(:order => "artists.name")
url = File.dirname(url) + "/"
break if url =~ /\.(?:net|com|org)\/$/
break if url =~ /pixiv\.net\/$/
end
artists.uniq_by {|x| x.name}.slice(0, 20)