/artists/banned, /favorites: fix redirects for non-html requests.
ref: https://danbooru.donmai.us/forum_topics/9127?page=287#forum_post_161549
This commit is contained in:
@@ -15,7 +15,7 @@ class ArtistsController < ApplicationController
|
||||
end
|
||||
|
||||
def banned
|
||||
redirect_to artists_path(search: { is_banned: "true", order: "updated_at" })
|
||||
redirect_to artists_path(search: { is_banned: "true", order: "updated_at" }, format: request.format.symbol)
|
||||
end
|
||||
|
||||
def ban
|
||||
|
||||
@@ -7,11 +7,11 @@ class FavoritesController < ApplicationController
|
||||
def index
|
||||
if params[:user_id].present?
|
||||
user = User.find(params[:user_id])
|
||||
redirect_to posts_path(tags: "ordfav:#{user.name}")
|
||||
redirect_to posts_path(tags: "ordfav:#{user.name}", format: request.format.symbol)
|
||||
elsif CurrentUser.is_member?
|
||||
redirect_to posts_path(tags: "ordfav:#{CurrentUser.name}")
|
||||
redirect_to posts_path(tags: "ordfav:#{CurrentUser.name}", format: request.format.symbol)
|
||||
else
|
||||
redirect_to posts_path
|
||||
redirect_to posts_path(format: request.format.symbol)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user