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.
This commit is contained in:
Pau Perez
2021-03-16 15:11:15 +01:00
parent e78fb784c6
commit 57101aa5b6

View File

@@ -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