From cc35391521b79848b51cfe921bd811d9bd2858c0 Mon Sep 17 00:00:00 2001 From: VitaliyAdamkov Date: Wed, 8 Jul 2020 13:51:46 +0300 Subject: [PATCH] Merge guest user cart with authenticated one For now, guest cart replaces authenticated with its content. --- app/controllers/spree/omniauth_callbacks_controller.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/controllers/spree/omniauth_callbacks_controller.rb b/app/controllers/spree/omniauth_callbacks_controller.rb index d3877a4..040c7cf 100644 --- a/app/controllers/spree/omniauth_callbacks_controller.rb +++ b/app/controllers/spree/omniauth_callbacks_controller.rb @@ -17,6 +17,8 @@ def provides_callback_for(*providers) Spree::SocialConfig.providers.keys.each do |provider| provides_callback_for provider end + + after_action :set_current_order, only: Spree::SocialConfig.providers.keys def omniauth_callback if request.env['omniauth.error'].present?