Browse Source

Fix link_to_login argument handling when a block is passed (#17345)

closed-social-glitch-2
Claire 2 years ago
committed by GitHub
parent
commit
dd63923c0a
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      app/helpers/application_helper.rb

+ 2
- 0
app/helpers/application_helper.rb View File

@ -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 ||= {}

Loading…
Cancel
Save