autocomplete: fixup limit param.
Fixiup for 378559ff4. Fix case when limit param is nil.
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user