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:
@@ -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 = []
|
||||
|
||||
|
||||
Reference in New Issue
Block a user