Permalink
Browse files

small fixes

  • Loading branch information...
1 parent 50f730f commit 04d07f06b796f70aee5f98a25e34569a5b82f98f @kristianmandrup committed Sep 15, 2012
@@ -2,7 +2,8 @@ module Controll::Enabler
class PathResolver
attr_reader :caller, :event_map
- ActionMapper = Controll::Flow::ActionMapper
+ ActionMapper = Controll::Flow::ActionMapper
+ Action = Controll::Flow::Action
def initialize caller, event_map
@caller = caller
@@ -15,7 +15,7 @@ def perform
end
class NiceCommander < Controll::Commander
- command_method(:sign_in, name: 'kris') { {parent_id: parent_id} }
+ command_method(:sign_off, name: 'kris') { {parent_id: parent_id} }
def params
{:id => 7}
@@ -17,6 +17,7 @@ def perfect
end
ActionMapper = Controll::Flow::ActionMapper
+Action = Controll::Flow::Action
class Redirecter < ActionMapper::Complex
end
@@ -30,9 +31,9 @@ class Renderer < ActionMapper::Simple
let(:render_map) { {'perfect' => [:cool, :sweet], 'home' => [:success] }}
let(:redirect_map) { {'inperfect' => [:cool, :sweet], 'away' => [:success] }}
- let(:redirect_action) { Redirecter.new controller, redirect_path }
- let(:render_action) { Renderer.new controller, render_path }
- let(:fallback_action) { ActionMapper::Fallback.new controller }
+ let(:redirect_action) { ActionMapper::Simple.action controller, redirect_path }
+ let(:render_action) { ActionMapper::Simple.action controller, render_path }
+ let(:fallback_action) { Action::Fallback.new controller }
let(:render_path) { 'perfect' }
let(:redirect_path) { 'away' }

0 comments on commit 04d07f0

Please sign in to comment.