0
0
Fork 0

Apply Rubocop Performance/BlockGivenWithExplicitBlock (#23441)

* Apply Rubocop Performance/BlockGivenWithExplicitBlock

* Unprefix used block parameter
This commit is contained in:
Nick Schonning 2023-02-08 04:36:23 -05:00 committed by GitHub
parent 26ac2447b4
commit 0d1f192c54
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 6 deletions

View file

@ -67,7 +67,7 @@ module ApplicationHelper
def link_to_login(name = nil, html_options = nil, &block)
target = new_user_session_path
html_options = name if block_given?
html_options = name if block
if omniauth_only? && Devise.mappings[:user].omniauthable? && User.omniauth_providers.size == 1
target = omniauth_authorize_path(:user, User.omniauth_providers[0])
@ -75,7 +75,7 @@ module ApplicationHelper
html_options[:method] = :post
end
if block_given?
if block
link_to(target, html_options, &block)
else
link_to(name, target, html_options)