| Module | Opensteam::Checkout::InstanceMethods |
| In: |
lib/opensteam/checkout.rb
|
create the checkout flow
define an init-method in your CheckoutController:
def init
create_checkout_flow do |c|
c.on :start, :intro
c.on :finish, :controller => "petstore", :action => "index"
end
end
# File lib/opensteam/checkout.rb, line 78
78: def create_checkout_flow( target = self )
79: yield target if block_given?
80: end
save the current-action name in the sessions
# File lib/opensteam/checkout.rb, line 57
57: def current_step
58: session[:current_action] = self.action_name
59: end
method to finish the checkout-process and redirect_to the action specified by :finish
# File lib/opensteam/checkout.rb, line 64
64: def endstep
65: redirect_to_step(:finish)
66: end
start the checkout process and redirect_to the action specified by :start
# File lib/opensteam/checkout.rb, line 85
85: def invoke
86: redirect_to_step(:start)
87: end