From: Toshi MARUYAMA Date: Fri, 6 Nov 2020 13:00:29 +0000 (+0000) Subject: use "do end" instead of {} at AuthSourcesController X-Git-Tag: 4.2.0~542 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=57807b771bf065b274ac8b05306eadddabb85753;p=redmine.git use "do end" instead of {} at AuthSourcesController git-svn-id: http://svn.redmine.org/redmine/trunk@20275 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/app/controllers/auth_sources_controller.rb b/app/controllers/auth_sources_controller.rb index 400183ab2..4fef1350f 100644 --- a/app/controllers/auth_sources_controller.rb +++ b/app/controllers/auth_sources_controller.rb @@ -78,7 +78,7 @@ class AuthSourcesController < ApplicationController def autocomplete_for_new_user results = AuthSource.search(params[:term]) - render :json => results.map {|result| + json = results.map do |result| { 'value' => result[:login], 'label' => "#{result[:login]} (#{result[:firstname]} #{result[:lastname]})", @@ -88,7 +88,8 @@ class AuthSourcesController < ApplicationController 'mail' => result[:mail].to_s, 'auth_source_id' => result[:auth_source_id].to_s } - } + end + render :json => json end private