From 0e2120d79f779f3b0db30112a2716619cbfa444d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marius=20B=C4=82LTEANU?= Date: Sat, 28 Feb 2026 13:02:07 +0700 Subject: [PATCH 1/3] Look for mentions by login using the existing find_by_login. --- app/helpers/application_helper.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 6f199197a..7fe9d4d9d 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -1289,12 +1289,12 @@ module ApplicationHelper link = link_to_project(p, {:only_path => only_path}, :class => 'project') end when 'user' - u = User.visible.find_by("LOWER(login) = :s AND type = 'User'", :s => name.downcase) + u = User.visible.find_by_login(name.downcase) link = link_to_user(u, :only_path => only_path) if u end elsif sep == "@" name = remove_double_quotes(identifier) - u = User.visible.find_by("LOWER(login) = :s AND type = 'User'", :s => name.downcase) + u = User.visible.find_by_login(name.downcase) link = link_to_mention(u, obj, only_path: only_path) if u end end -- 2.50.1 (Apple Git-155)