Module: Opensteam::Checkout::InstanceMethods
- Defined in:
- lib/opensteam/checkout.rb
Instance Method Summary collapse
- #create_checkout_flow(target = self) {|target| ... } ⇒ Object
-
#current_step ⇒ Object
save the current-action name in the sessions.
-
#endstep ⇒ Object
method to finish the checkout-process and redirect_to the action specified by :finish.
-
#invoke ⇒ Object
start the checkout process and redirect_to the action specified by :start.
-
#on(sym, hash) ⇒ Object
define a flow step on :start, :intro on :finish, :controller => “webshop”, :action => “index”.
Instance Method Details
#create_checkout_flow(target = self) {|target| ... } ⇒ Object
69 70 71 |
# File 'lib/opensteam/checkout.rb', line 69 def create_checkout_flow( target = self ) yield target if block_given? end |
#current_step ⇒ Object
save the current-action name in the sessions
57 58 59 |
# File 'lib/opensteam/checkout.rb', line 57 def current_step session[:current_action] = self.action_name end |
#endstep ⇒ Object
method to finish the checkout-process and redirect_to the action specified by :finish
64 65 66 |
# File 'lib/opensteam/checkout.rb', line 64 def endstep redirect_to_step(:finish) end |
#invoke ⇒ Object
start the checkout process and redirect_to the action specified by :start
76 77 78 |
# File 'lib/opensteam/checkout.rb', line 76 def invoke redirect_to_step(:start) end |
#on(sym, hash) ⇒ Object
define a flow step
on :start, :intro
on :finish, :controller => "webshop", :action => "index"
85 86 87 |
# File 'lib/opensteam/checkout.rb', line 85 def on(sym, hash) steps.store( sym, hash ) end |