From f62a9252dfdd8cbcd1efa4262821764668285ede Mon Sep 17 00:00:00 2001 From: Yash Baheti <34238132+yashbth@users.noreply.github.com> Date: Sat, 10 Mar 2018 00:21:23 +0530 Subject: [PATCH] Update tag_controller.rb --- app/controllers/tag_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/tag_controller.rb b/app/controllers/tag_controller.rb index 24c45313b9..bbde1a2cdb 100644 --- a/app/controllers/tag_controller.rb +++ b/app/controllers/tag_controller.rb @@ -338,7 +338,7 @@ def delete end def suggested - if params[:id].length > 2 + if !params[:id].empty? && params[:id].length > 2 @suggestions = [] # filtering out tag spam by requiring tags attached to a published node Tag.where('name LIKE ?', '%' + params[:id] + '%')