Skip to content

Commit

Permalink
adds links for github
Browse files Browse the repository at this point in the history
- to be refactored
- working version
  • Loading branch information
sbpipb committed Oct 25, 2019
1 parent db0e7e0 commit ca05a69
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/views/devise/shared/_links.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@
<%- resource_class.omniauth_providers.each do |provider| %>
<% if provider.to_s == "google_oauth2" && (current_page?(new_user_session_path) || current_page?(new_user_password_path)) %>
<%= button_to t('devise.shared.sign_in_google'), omniauth_authorize_path(resource_name, provider), method: :post, class: 'buttonGhostM' %>
<% elsif provider.to_s == "github" && (current_page?(new_user_session_path) || current_page?(new_user_password_path)) %>
<%= button_to t('devise.shared.sign_in_github'), omniauth_authorize_path(resource_name, provider), method: :post, class: 'buttonGhostM' %>
<% elsif provider.to_s == "google_oauth2" %>
<%= button_to t('devise.shared.sign_up_google'), omniauth_authorize_path(resource_name, provider), method: :post, class: 'buttonGhostM' %>
<% elsif provider.to_s == 'github' %>
<%= button_to t('devise.shared.sign_up_github'), omniauth_authorize_path(resource_name, provider), method: :post, class: 'buttonGhostM' %>
<% end -%>
<% end -%>
</div>
Expand Down

0 comments on commit ca05a69

Please sign in to comment.