]> source.dussan.org Git - redmine.git/commitdiff
cleanup: rubocop: fix Layout/BlockEndNewline in app/controllers/auth_sources_controll...
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sat, 9 Nov 2019 09:19:02 +0000 (09:19 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sat, 9 Nov 2019 09:19:02 +0000 (09:19 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@19004 e93f8b46-1217-0410-a6f0-8f06a7374b81

.rubocop_todo.yml
app/controllers/auth_sources_controller.rb

index eb77f71e0bb758f73370de01d72ed40fa37876ce..30eb9b9b024443c0a18511ee083fa120422b0b68 100644 (file)
@@ -25,7 +25,6 @@ Layout/BlockAlignment:
 # Cop supports --auto-correct.
 Layout/BlockEndNewline:
   Exclude:
-    - 'app/controllers/auth_sources_controller.rb'
     - 'app/controllers/files_controller.rb'
     - 'app/models/message.rb'
 
index fa23252bffa40a96c588cc65ebfe93c74d72cfc4..295dfd1568c684fb646c601aaf24f20589d35997 100644 (file)
@@ -78,16 +78,17 @@ class AuthSourcesController < ApplicationController
 
   def autocomplete_for_new_user
     results = AuthSource.search(params[:term])
-
-    render :json => results.map {|result| {
-      'value' => result[:login],
-      'label' => "#{result[:login]} (#{result[:firstname]} #{result[:lastname]})",
-      'login' => result[:login].to_s,
-      'firstname' => result[:firstname].to_s,
-      'lastname' => result[:lastname].to_s,
-      'mail' => result[:mail].to_s,
-      'auth_source_id' => result[:auth_source_id].to_s
-    }}
+    render :json => results.map {|result|
+      {
+        'value' => result[:login],
+        'label' => "#{result[:login]} (#{result[:firstname]} #{result[:lastname]})",
+        'login' => result[:login].to_s,
+        'firstname' => result[:firstname].to_s,
+        'lastname' => result[:lastname].to_s,
+        'mail' => result[:mail].to_s,
+        'auth_source_id' => result[:auth_source_id].to_s
+      }
+    }
   end
 
   private