Created
February 16, 2015 20:53
-
-
Save skwp/d22a6c81aaa6befa644b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MyController < ApplicationController | |
class SomeWisperThing | |
include Wisper::Publisher | |
def execute | |
publish :foo | |
end | |
end | |
def create | |
command = SomeWisperThing.new | |
command.on(:foo) do | |
# Here we're using an early return to stop | |
# controller flow. We should not do this. | |
return respond_with(@whatever) | |
end | |
command.execute | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment