mirror of
https://github.com/meineerde/redmine.git
synced 2025-12-19 15:01:14 +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:
parent
73be0198d1
commit
bc0d654802
@ -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'
|
||||
|
||||
|
||||
@ -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}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user