I\'m trying to use the current_order method defined in the Spree::Core engine: https://github.com/spree/spree/blob/master/core/lib/spree/core/current_order.rb
In my
This question is a bit old, but here is a possible answer, for the record.
Maybe you can work around by using a piece of the spree code in your controller. It's generally a better idea to have the code in the controller (or, in the case of Spree, in a controller_decorator), than in the view.
For example if you need this in your products view as @current_order:
Spree::ProductsController.class_eval do
@current_order = Spree::Order.find(session[:order_id])
end
But I don't know why it's working in development and not in production.