| Path: | lib/action_flow/view_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 ViewStep class documentation for more options.
# File lib/action_flow/view_step.rb, line 222 def view_step(*view_name, &block) # Instanciate a ViewStep object if symbol or string received view_name.each do |name| step = ActionFlow::ViewStep.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