Skip to content

Instantly share code, notes, and snippets.

@skwp
Created February 16, 2015 20:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save skwp/d22a6c81aaa6befa644b to your computer and use it in GitHub Desktop.
Save skwp/d22a6c81aaa6befa644b to your computer and use it in GitHub Desktop.
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