autocomplete: fixup limit param.

Fixiup for 378559ff4. Fix case when limit param is nil.
This commit is contained in:
evazion
2019-11-17 14:19:40 -06:00
parent 64728c89d8
commit e29d7162a4

View File

@@ -18,7 +18,7 @@ class TagsController < ApplicationController
# limit rollout # limit rollout
@tags = TagAutocomplete.search(params[:search][:name_matches]) @tags = TagAutocomplete.search(params[:search][:name_matches])
else 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 end
# XXX # XXX