From e29d7162a4d065ea3db86ec45f70d907646bd773 Mon Sep 17 00:00:00 2001 From: evazion Date: Sun, 17 Nov 2019 14:19:40 -0600 Subject: [PATCH] autocomplete: fixup limit param. Fixiup for 378559ff4. Fix case when limit param is nil. --- app/controllers/tags_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/tags_controller.rb b/app/controllers/tags_controller.rb index d919bf98b..4843f3b96 100644 --- a/app/controllers/tags_controller.rb +++ b/app/controllers/tags_controller.rb @@ -18,7 +18,7 @@ class TagsController < ApplicationController # limit rollout @tags = TagAutocomplete.search(params[:search][:name_matches]) else - @tags = Tag.names_matches_with_aliases(params[:search][:name_matches], limit: params[:limit]) + @tags = Tag.names_matches_with_aliases(params[:search][:name_matches], params.fetch(:limit, 10).to_i) end # XXX