Add omniauth_provider_name().

Akinori MUSHA 10 lat temu
rodzic
commit
4f0e983684
2 zmienionych plików z 5 dodań i 1 usunięć
  1. 4 0
      app/helpers/application_helper.rb
  2. 1 1
      app/views/services/index.html.erb

+ 4 - 0
app/helpers/application_helper.rb

@@ -49,4 +49,8 @@ module ApplicationHelper
49 49
       content_tag :i, '', class: "fa fa-lock"
50 50
     end
51 51
   end
52
+
53
+  def omniauth_provider_name(provider)
54
+    t("devise.omniauth_providers.#{provider}")
55
+  end
52 56
 end

+ 1 - 1
app/views/services/index.html.erb

@@ -27,7 +27,7 @@
27 27
 
28 28
         <% @services.each do |service| %>
29 29
           <tr>
30
-            <td><%= service.provider %></td>
30
+            <td><%= omniauth_provider_name(service.provider) %></td>
31 31
             <td><%= service.name %></td>
32 32
             <td><%= service.global ? 'Yes' : 'No' %></td>
33 33
             <td>