Skip to content

Commit

Permalink
Set Alchemy.logout_method to Devise.sign_out_via
Browse files Browse the repository at this point in the history
Keep these two in sync.
  • Loading branch information
tvdeyen committed Jan 6, 2020
1 parent 317d3f6 commit c44d0cc
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions config/initializers/alchemy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,9 @@
Alchemy.signup_path = '/admin/signup'
Alchemy.login_path = '/admin/login'
Alchemy.logout_path = '/admin/logout'

if Alchemy.respond_to?(:logout_method)
Rails.application.config.after_initialize do
Alchemy.logout_method = Devise.sign_out_via
end
end

0 comments on commit c44d0cc

Please sign in to comment.