about summary refs log tree commit diff
path: root/app/helpers/application_helper.rb
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2022-01-24 03:29:03 +0100
committerGitHub <noreply@github.com>2022-01-24 03:29:03 +0100
commitdd63923c0ae3601de76dee5bcf3a83f875584326 (patch)
tree746868bae3998df2ab0060b35d5010213c0aaeb6 /app/helpers/application_helper.rb
parent0a120d86d28e3f2e20455f56c1656f5d5f2f4af6 (diff)
Fix link_to_login argument handling when a block is passed (#17345)
Diffstat (limited to 'app/helpers/application_helper.rb')
-rw-r--r--app/helpers/application_helper.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index 9e16de5b5..36c66b7d1 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -64,6 +64,8 @@ module ApplicationHelper
   def link_to_login(name = nil, html_options = nil, &block)
     target = new_user_session_path
 
+    html_options = name if block_given?
+
     if omniauth_only? && Devise.mappings[:user].omniauthable? && User.omniauth_providers.size == 1
       target = omniauth_authorize_path(:user, User.omniauth_providers[0])
       html_options ||= {}