1
0
mirror of https://github.com/meineerde/redmine.git synced 2025-10-17 17:01:01 +00:00

cleanup: rubocop: fix Layout/BlockAlignment in app/models/principal.rb

git-svn-id: http://svn.redmine.org/redmine/trunk@19003 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2019-11-09 09:18:51 +00:00
parent 73be0198d1
commit bc0d654802
2 changed files with 6 additions and 6 deletions

View File

@ -19,7 +19,6 @@ Layout/AlignHash:
# SupportedStylesAlignWith: either, start_of_block, start_of_line
Layout/BlockAlignment:
Exclude:
- 'app/models/principal.rb'
- 'app/models/project.rb'
- 'app/models/time_entry.rb'

View File

@ -179,11 +179,12 @@ class Principal < ActiveRecord::Base
if principal.nil? && / /.match?(keyword)
firstname, lastname = *(keyword.split) # "First Last Throwaway"
principal ||= principals.detect {|a|
a.is_a?(User) &&
firstname.casecmp(a.firstname.to_s) == 0 &&
lastname.casecmp(a.lastname.to_s) == 0
}
principal ||=
principals.detect {|a|
a.is_a?(User) &&
firstname.casecmp(a.firstname.to_s) == 0 &&
lastname.casecmp(a.lastname.to_s) == 0
}
end
if principal.nil?
principal ||= principals.detect {|a| keyword.casecmp(a.name) == 0}