Module Opensteam::Checkout::InstanceMethods
In: lib/opensteam/checkout.rb

Methods

Public Instance methods

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

[Source]

    # 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

[Source]

    # 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

[Source]

    # 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

[Source]

    # File lib/opensteam/checkout.rb, line 85
85:       def invoke
86:         redirect_to_step(:start)
87:       end

define a flow step

  on :start, :intro
  on :finish, :controller => "webshop", :action => "index"

[Source]

    # File lib/opensteam/checkout.rb, line 94
94:       def on(sym, hash)
95:         steps.store( sym, hash )
96:       end

[Validate]