mirror of
https://github.com/meineerde/redmine.git
synced 2025-12-19 15:01:14 +00:00
code cleanup: rubocop: fix Performance/RedundantBlockCall in app/controllers/application_controller.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@18821 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
319eeae14d
commit
252450b44c
@ -526,11 +526,6 @@ Performance/FixedSize:
|
|||||||
- 'test/integration/api_test/issues_test.rb'
|
- 'test/integration/api_test/issues_test.rb'
|
||||||
- 'test/integration/attachments_test.rb'
|
- 'test/integration/attachments_test.rb'
|
||||||
|
|
||||||
# Cop supports --auto-correct.
|
|
||||||
Performance/RedundantBlockCall:
|
|
||||||
Exclude:
|
|
||||||
- 'app/controllers/application_controller.rb'
|
|
||||||
|
|
||||||
# Cop supports --auto-correct.
|
# Cop supports --auto-correct.
|
||||||
Performance/RedundantMatch:
|
Performance/RedundantMatch:
|
||||||
Exclude:
|
Exclude:
|
||||||
|
|||||||
@ -486,7 +486,7 @@ class ApplicationController < ActionController::Base
|
|||||||
if args.any?
|
if args.any?
|
||||||
redirect_to *args
|
redirect_to *args
|
||||||
elsif block_given?
|
elsif block_given?
|
||||||
block.call
|
yield
|
||||||
else
|
else
|
||||||
raise "#redirect_to_referer_or takes arguments or a block"
|
raise "#redirect_to_referer_or takes arguments or a block"
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user