]> source.dussan.org Git - redmine.git/commitdiff
cleanup: rubocop: fix Layout/BlockAlignment in app/models/principal.rb
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sat, 9 Nov 2019 09:18:51 +0000 (09:18 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sat, 9 Nov 2019 09:18:51 +0000 (09:18 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@19003 e93f8b46-1217-0410-a6f0-8f06a7374b81

.rubocop_todo.yml
app/models/principal.rb

index 7aac33c00f2c23553aa2e4761543d845c86ae02f..eb77f71e0bb758f73370de01d72ed40fa37876ce 100644 (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'
 
index 44c7862edfed42526f5325e02ffd4ddb699820c4..d415810d5c4ebfa806fe9563c49761ea9f150655 100644 (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}