From: Toshi MARUYAMA Date: Sat, 9 Nov 2019 09:18:51 +0000 (+0000) Subject: cleanup: rubocop: fix Layout/BlockAlignment in app/models/principal.rb X-Git-Tag: 4.1.0~100 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=bc0d654802879bc80c8991b15feba88b4c7117be;p=redmine.git 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 --- diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 7aac33c00..eb77f71e0 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -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' diff --git a/app/models/principal.rb b/app/models/principal.rb index 44c7862ed..d415810d5 100644 --- a/app/models/principal.rb +++ b/app/models/principal.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}