related tags: refactor /related_tags.js to avoid updating unchanged columns.
Refactor the /related_tags.js call so that when the "Related tags" button is clicked, it only replaces the columns that actually changed, not the entire related tags section. This avoids rebuilding the Recent / Frequent / Translated Tags / Artist columns every time the "Related tags" button is clicked.
This commit is contained in:
@@ -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], user: CurrentUser.user)
|
||||
@query = RelatedTagQuery.new(query: params[:query], category: params[:category], user: CurrentUser.user)
|
||||
respond_with(@query) do |format|
|
||||
format.json do
|
||||
render :json => @query.to_json
|
||||
|
||||
Reference in New Issue
Block a user