| Path: | lib/action_flow/action_step.rb |
| Last Update: | Wed May 16 22:50:21 -0400 2007 |
Called to define a step into a flow. Example of usage :
view_step :view_name do on :success => :another_step on :back => :yet_another_step end
See the ActionStep class documentation for more options.
# File lib/action_flow/action_step.rb, line 103 def action_step(*action_name, &block) # Instanciate a ViewStep object if symbol or string received action_name.each do |name| step = ActionFlow::ActionStep.new(name.to_s) # Register this step in the flow repository register name.to_s, step # Execute the config block step.instance_eval(&block) if block_given? end end