From 317d3f6b9d62c6c3505ba5930a7e1d9891b7958b Mon Sep 17 00:00:00 2001 From: Thomas von Deyen Date: Mon, 6 Jan 2020 09:36:37 +0100 Subject: [PATCH 1/2] Add listen gem for local development --- Gemfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Gemfile b/Gemfile index bb83241..554d004 100644 --- a/Gemfile +++ b/Gemfile @@ -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 From c44d0cc68dea23e581086a0e3b4bb14bf98312f5 Mon Sep 17 00:00:00 2001 From: Thomas von Deyen Date: Mon, 6 Jan 2020 09:37:08 +0100 Subject: [PATCH 2/2] Set Alchemy.logout_method to Devise.sign_out_via Keep these two in sync. --- config/initializers/alchemy.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/config/initializers/alchemy.rb b/config/initializers/alchemy.rb index 8327370..f1ff0e3 100644 --- a/config/initializers/alchemy.rb +++ b/config/initializers/alchemy.rb @@ -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