Add support for using any of the current related tag types
Regardless of category or query. This meant that the category value had to be passed in as either null or the value itself for both types of functions. It also fixes an issue where the category wasn't settable on the pattern matching type.
This commit is contained in:
@@ -4,9 +4,10 @@ class RelatedTagsController < ApplicationController
|
||||
def show
|
||||
query = params[:query] || search_params[:query]
|
||||
category = params[:category] || search_params[:category]
|
||||
type = params[:type] || search_params[:type]
|
||||
limit = params[:limit]
|
||||
|
||||
@query = RelatedTagQuery.new(query: query, category: category, user: CurrentUser.user, limit: limit)
|
||||
@query = RelatedTagQuery.new(query: query, category: category, type: type, user: CurrentUser.user, limit: limit)
|
||||
respond_with(@query)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user