]> git.openstreetmap.org Git - rails.git/blobdiff - app/views/application/_auth_providers.html.erb
Remove unnecessary loop when rendering preferred auth provider button
[rails.git] / app / views / application / _auth_providers.html.erb
index 89de3b4ffbf63a19f01ae08f9ce3d523d1d90911..c77a3ed3ee171700a5725e26542e02436e933dd8 100644 (file)
 
     <% if prefered_auth_button_available %>
       <div class="col justify-content-center d-flex align-items-center flex-wrap">
-        <% %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 %>
       </div>
     <% end %>