Skip to content
Kris Leech edited this page Jun 5, 2014 · 1 revision
class MyController < ApplicationController
  def create
    my_service = MyService.new(...)
    my_service.subscribe(self, prefix: 'on')
    my_service.run
  end

  def on_success
    redirect_to ...
  end

  def on_failure
    render ...
  end
end