Need to call after_complete state callback so that session[:order_id] is nil'd after successful order. Related to #48.

This commit is contained in:
Ryan Bigg 2012-05-02 10:38:51 -05:00
parent 5ab0b9d6be
commit 7e018fb2d2
1 changed files with 1 additions and 0 deletions

View File

@ -146,6 +146,7 @@ module Spree
end
@order.update_attribute(:state, "complete")
state_callback(:after) # So that after_complete is called, setting session[:order_id] to nil
@order.finalize!
flash[:notice] = I18n.t(:order_processed_successfully)
redirect_to completion_route