Skip to content

Commit

Permalink
Merge pull request #96 from AlchemyCMS/set-logout-method-devise-setting
Browse files Browse the repository at this point in the history
Set Alchemy.logout_method to Devise.sign_out_via
  • Loading branch information
tvdeyen authored Jan 9, 2020
2 parents 94b5915 + c44d0cc commit 9468d85
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ unless ENV['CI']
gem 'spring-commands-rspec'
gem 'launchy'
gem 'github_fast_changelog', require: false
gem 'listen', require: false
end

group :test do
Expand Down
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 9468d85

Please sign in to comment.