diff --git a/app/controllers/metal_decorator.rb b/app/controllers/metal_decorator.rb new file mode 100644 index 0000000000..18ec22e4c8 --- /dev/null +++ b/app/controllers/metal_decorator.rb @@ -0,0 +1,6 @@ +# For the API +ActionController::Metal.class_eval do + def spree_current_user + @spree_current_user ||= env['warden'].user + end +end