From 3942177f49002d50aa65f803be85167d845675dd Mon Sep 17 00:00:00 2001 From: Go MAEDA Date: Wed, 11 Jan 2023 13:20:52 +0000 Subject: Fix RuboCop offense Performance/BlockGivenWithExplicitBlock (#38146). git-svn-id: https://svn.redmine.org/redmine/trunk@22027 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/controllers/application_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/controllers/application_controller.rb') diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index d400bdca8..4382bb3bc 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -552,7 +552,7 @@ class ApplicationController < ActionController::Base else if args.any? redirect_to *args - elsif block_given? + elsif block yield else raise "#redirect_to_referer_or takes arguments or a block" -- cgit v1.2.3