Class ActionFlow::Controller
In: lib/plugins/controller_level_error_handler.rb
Parent: ActionFlow::Plugin

This class adds a couple validations before creating a new flow.

Methods

notify  

Public Class methods

Method to override in a plugin subclass. This method will be called when a controller encounters one of it‘s internal events

[Source]

# File lib/plugins/controller_level_error_handler.rb, line 37
    def self::notify( system_event)
             
      # Make sure there's a start_step defined

      raise (ActionFlowError.new, "Your controller must declare a start step name. Use 'start_step :step_name' and define this step in the mapping.") if controller.instance_variable_get("@_start_step").nil?
                
      # Make sure there's an end_step defined

      raise (ActionFlowError.new, "Your controller must declare an end step name. Use 'end_step :step_name' and define this step in the mapping. I suggest using a view step which could redirect if you don't want to create a 'thank you' screen.") if controller.instance_variable_get("@_end_step").nil?
      
      # Resume filter chain

      resume
            
    end

[Validate]