related tags: eliminate favorite_tags cookie (#3955).

This commit is contained in:
evazion
2018-10-12 21:18:15 -05:00
parent 4e2944ee06
commit ae52b487e8
5 changed files with 9 additions and 15 deletions

View File

@@ -3,7 +3,7 @@ class RelatedTagsController < ApplicationController
before_action :require_reportbooru_key, only: [:update]
def show
@query = RelatedTagQuery.new(params[:query], category: params[:category], translated_tags: params[:translated_tags], artists: params[:artists])
@query = RelatedTagQuery.new(params[:query], category: params[:category], translated_tags: params[:translated_tags], artists: params[:artists], user: CurrentUser.user)
respond_with(@query) do |format|
format.json do
render :json => @query.to_json

View File

@@ -65,8 +65,6 @@ class UsersController < ApplicationController
@user = User.find(params[:id])
check_privilege(@user)
@user.update(user_params(:update))
cookies.delete(:favorite_tags)
cookies.delete(:favorite_tags_with_categories)
if @user.errors.any?
flash[:notice] = @user.errors.full_messages.join("; ")
else