autocomplete: make number of results configurable (partly).
Add `Danbooru.Autocomplete.MAX_RESULTS` param that controls the number of results returned by autocomplete. This does not work with tag autocomplete for Builders. Builder autocomplete still needs to be refactored and unified with Member autocomplete. Also fix a bug in the /saved_searches/labels endpoint where the limit param wasn't respected.
This commit is contained in:
@@ -7,7 +7,7 @@ class SavedSearchesController < ApplicationController
|
||||
end
|
||||
|
||||
def labels
|
||||
@labels = SavedSearch.search_labels(CurrentUser.id, params[:search])
|
||||
@labels = SavedSearch.search_labels(CurrentUser.id, params[:search]).take(params[:limit].to_i || 10)
|
||||
respond_with(@labels)
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user