Files
openfoodnetwork/app/controllers/metal_decorator.rb
Pau Perez 57101aa5b6 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.
2021-03-16 15:12:44 +01:00

7 lines
142 B
Ruby

# For the API
ActionController::Metal.class_eval do
def spree_current_user
@spree_current_user ||= request.env['warden'].user
end
end