From: Anton Khorev Date: Wed, 17 Jul 2024 14:47:13 +0000 (+0300) Subject: Remove unnecessary loop when rendering preferred auth provider button X-Git-Tag: live~303^2 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/206012ae8e9b9ab690ef751d080fcbe1ce314918?hp=38cb875c200ca15058557cd2a3070d8b129f41a2 Remove unnecessary loop when rendering preferred auth provider button --- diff --git a/app/views/application/_auth_providers.html.erb b/app/views/application/_auth_providers.html.erb index 89de3b4ff..c77a3ed3e 100644 --- a/app/views/application/_auth_providers.html.erb +++ b/app/views/application/_auth_providers.html.erb @@ -13,13 +13,7 @@ <% if prefered_auth_button_available %>
- <% %w[google facebook microsoft github wikipedia].each do |provider| %> - <% if Settings.key?("#{provider}_auth_id".to_sym) -%> - <% if @preferred_auth_provider == provider %> - <%= auth_button_preferred provider %> - <% end %> - <% end -%> - <% end -%> + <%= auth_button_preferred @preferred_auth_provider %>
<% end %>