From bc0d654802879bc80c8991b15feba88b4c7117be Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Sat, 9 Nov 2019 09:18:51 +0000 Subject: [PATCH] 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 --- .rubocop_todo.yml | 1 - app/models/principal.rb | 11 ++++++----- 2 files changed, 6 insertions(+), 6 deletions(-) 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} -- 2.39.5