Fix #4670: Replace RequestStore with AS::CurrentAttributes.
This also requires replacing CurrentUser.name with CurrentUser.user.name because the `name` method had a conflict with CurrentAttributes.
This commit is contained in:
@@ -12,7 +12,7 @@ class FavoritesController < ApplicationController
|
||||
user = User.find(params[:user_id])
|
||||
redirect_to posts_path(tags: "ordfav:#{user.name}", format: request.format.symbol)
|
||||
elsif !CurrentUser.is_anonymous?
|
||||
redirect_to posts_path(tags: "ordfav:#{CurrentUser.name}", format: request.format.symbol)
|
||||
redirect_to posts_path(tags: "ordfav:#{CurrentUser.user.name}", format: request.format.symbol)
|
||||
else
|
||||
redirect_to posts_path(format: request.format.symbol)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user