Move normalize_for_artist_finder! into model.

Move the call to normalize_for_artist_finder! from the artist
controller into Artist#find_all_by_url. This makes testing easier.
It also makes it so that URLs are normalized when using the search
form on the artist listing page.
This commit is contained in:
evazion
2014-10-05 12:08:09 -05:00
parent 7f3b98969f
commit dcbe061809
2 changed files with 2 additions and 3 deletions

View File

@@ -22,6 +22,7 @@ class Artist < ActiveRecord::Base
module ClassMethods
def find_all_by_url(url)
url = Sources::Site.new(url).normalize_for_artist_finder!
url = ArtistUrl.normalize(url)
artists = []