Skip to content

Commit

Permalink
Fix devise new template (#762)
Browse files Browse the repository at this point in the history
* remove useless '='

* fix translation key of sign_in_with and provide default location for omniauth callback
  • Loading branch information
kcinay055679 committed Aug 26, 2024
1 parent 7a88cc4 commit 7e7b32c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions app/views/devise/sessions/new.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
= ti("devise.sign_in")
- if devise_mapping.omniauthable?
- resource_class.omniauth_providers.each do |provider|
=
= button_to ti("sign_in_with", provider: provider.to_s.titleize), omniauth_authorize_path(resource_name, provider), {data: { turbo: false }, class: "btn btn-primary"}
= button_to ti("devise.sign_in_with", provider: provider.to_s.titleize), omniauth_authorize_path(resource_name, provider), {data: { turbo: false }, class: "btn btn-primary"}
- else
= ti("devise.no_omniauth_providers")
2 changes: 1 addition & 1 deletion config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
devise_for :auth_users,
skip: [:sessions],
controllers:
{ omniauth_callbacks: 'omniauth_callbacks' }
{ omniauth_callbacks: 'omniauth_callbacks' }, defaults: { locale: nil }

devise_scope :auth_user do
get 'sign_in', :to => 'devise/sessions#new', :as => :new_auth_user_session
Expand Down

0 comments on commit 7e7b32c

Please sign in to comment.