From 5f0a677e970840a31362cb5f8ff9af0358295702 Mon Sep 17 00:00:00 2001 From: Venkata Rama Rahul Chintalapati Date: Thu, 29 Apr 2021 22:22:03 +0530 Subject: [PATCH] convert tagname to string to avoid error #9585 --- 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 b15c3fb1dd..673c37a081 100644 --- a/app/controllers/tag_controller.rb +++ b/app/controllers/tag_controller.rb @@ -77,7 +77,7 @@ def index def show if params[:id].is_a? Integer @wiki = Node.find(params[:id])&.first - elsif params[:id].match?(":") + elsif params[:id].to_s.match?(":") @wiki = Node.where(slug: params[:id].match('[^:]*$').to_s).try(:first) else @wiki = Node.where(path: "/wiki/#{params[:id]}").try(:first) || Node.where(path: "/#{params[:id]}").try(:first)