class Controll::Flow::Action::Base
Attributes
controller[R]
errors[R]
path[R]
Public Class Methods
new(controller, path)
click to toggle source
# File lib/controll/flow/action/base.rb, line 5 def initialize controller, path @controller = controller @path = path.to_s end
Public Instance Methods
set_errors(*errors)
click to toggle source
# File lib/controll/flow/action/base.rb, line 10 def set_errors *errors @errors = errors.flatten end
Protected Instance Methods
controller_action()
click to toggle source
# File lib/controll/flow/action/base.rb, line 20 def controller_action @controller_action ||= "do_#{type}" end
error_check!()
click to toggle source
# File lib/controll/flow/action/base.rb, line 24 def error_check! unless controller.respond_to? controller_action raise Controll::NotEnabled, "Controll::Enabler has not been included in #{controller.class}. Missing #{controller_action} method" end end