mirror of
https://github.com/mastodon/mastodon.git
synced 2024-12-21 00:29:47 +00:00
Fix link_to_login argument handling when a block is passed (#17345)
This commit is contained in:
parent
0a120d86d2
commit
dd63923c0a
|
@ -64,6 +64,8 @@ module ApplicationHelper
|
||||||
def link_to_login(name = nil, html_options = nil, &block)
|
def link_to_login(name = nil, html_options = nil, &block)
|
||||||
target = new_user_session_path
|
target = new_user_session_path
|
||||||
|
|
||||||
|
html_options = name if block_given?
|
||||||
|
|
||||||
if omniauth_only? && Devise.mappings[:user].omniauthable? && User.omniauth_providers.size == 1
|
if omniauth_only? && Devise.mappings[:user].omniauthable? && User.omniauth_providers.size == 1
|
||||||
target = omniauth_authorize_path(:user, User.omniauth_providers[0])
|
target = omniauth_authorize_path(:user, User.omniauth_providers[0])
|
||||||
html_options ||= {}
|
html_options ||= {}
|
||||||
|
|
Loading…
Reference in a new issue