artists: reorganize index page.
* Make other names searchable. * Add post count and update timestamp. * Add edit / delete / undelete links.
This commit is contained in:
@@ -38,6 +38,8 @@ class ArtistsController < ApplicationController
|
||||
|
||||
def index
|
||||
@artists = Artist.includes(:urls).paginated_search(params)
|
||||
@artists = @artists.includes(:tag) if request.format.html?
|
||||
@artists = @artists.includes(:urls) if !request.format.html?
|
||||
|
||||
if params[:redirect].to_s.truthy? && @artists.one? && @artists.first.name == Artist.normalize_name(params[:search][:any_name_or_url_matches])
|
||||
redirect_to @artists.first
|
||||
|
||||
Reference in New Issue
Block a user