Refactor normalize_for_artist_finder!
Refactors things such that Sources::Site has a normalize_for_artist_finder! method that delegates to the strategy for the appropriate site. This way any site that needs to normalize URLs for the artist finder can do so.
This commit is contained in:
@@ -118,7 +118,7 @@ class ArtistsController < ApplicationController
|
||||
end
|
||||
|
||||
def finder
|
||||
url = Sources::Strategies::Pixiv.new(url).normalize_for_artist_finder!(params[:url])
|
||||
url = Sources::Site.new(params[:url]).normalize_for_artist_finder!
|
||||
|
||||
@artists = Artist.url_matches(url).order("id desc").limit(20)
|
||||
respond_with(@artists) do |format|
|
||||
|
||||
Reference in New Issue
Block a user