diff options
author | Claire <claire.github-309c@sitedethib.com> | 2023-02-09 12:46:12 +0100 |
---|---|---|
committer | Claire <claire.github-309c@sitedethib.com> | 2023-02-09 12:46:12 +0100 |
commit | 85558a5e18a58247606954050a5866e62c877f91 (patch) | |
tree | 982808241c0f64c20f8eec9b1ce5651b3c5195da /app/helpers/application_helper.rb | |
parent | 76b4e7727b7497c1b68e06133831701f8950ae19 (diff) | |
parent | c5a4d8c82ddd5265abc830959a58cdaf1f061a43 (diff) |
Merge branch 'main' into glitch-soc/merge-upstream
Conflicts: - `README.md`: Minor upstream change, our README is completely different. Kept ours. - `lib/tasks/assets.rake`: glitch-soc has extra code to deal with its theming system, upstream changed a line that exists in glitch-soc. Applied upstream changes.
Diffstat (limited to 'app/helpers/application_helper.rb')
-rw-r--r-- | app/helpers/application_helper.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index af453825b..774643625 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -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) |