From 06b53fd60f48d06c9e95a0418367e42cff2039d9 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Sat, 7 Nov 2020 12:31:10 +0000 Subject: [PATCH] use "do end" instead of {} at app/models/principal.rb git-svn-id: http://svn.redmine.org/redmine/trunk@20288 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/principal.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/principal.rb b/app/models/principal.rb index 525693129..c31effec4 100644 --- a/app/models/principal.rb +++ b/app/models/principal.rb @@ -183,11 +183,11 @@ class Principal < ActiveRecord::Base if principal.nil? && / /.match?(keyword) firstname, lastname = *(keyword.split) # "First Last Throwaway" principal ||= - principals.detect {|a| + principals.detect do |a| a.is_a?(User) && firstname.casecmp(a.firstname.to_s) == 0 && lastname.casecmp(a.lastname.to_s) == 0 - } + end end if principal.nil? principal ||= principals.detect {|a| keyword.casecmp(a.name) == 0} -- 2.39.5