From 57101aa5b66dd8e76f2d73bfe6955ccbe7b2495d Mon Sep 17 00:00:00 2001 From: Pau Perez Date: Tue, 16 Mar 2021 15:11:15 +0100 Subject: [PATCH] Fix `env` deprecated in Rails 5.0 I found it at the very bottom of the `test-consumer-features` CI build job. See: https://github.com/rails/rails/issues/23294. --- app/controllers/metal_decorator.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/metal_decorator.rb b/app/controllers/metal_decorator.rb index 18ec22e4c8..0c8f81501f 100644 --- a/app/controllers/metal_decorator.rb +++ b/app/controllers/metal_decorator.rb @@ -1,6 +1,6 @@ # For the API ActionController::Metal.class_eval do def spree_current_user - @spree_current_user ||= env['warden'].user + @spree_current_user ||= request.env['warden'].user end end