title: Using responders with a respond_with that takes a block
body: <p>I was running rails 3.2.1 and using rails 3 responders as well as the flash responder available in the responders gem: <a href="https://github.com/plataformatec/responders" rel="nofollow">https://github.com/plataformatec/responders</a></p>
  
  <p>For some of my controller actions I always want to redirect back to the previous URL but display a flash message if the object is created or not, it looks something like this:</p>
  
  <pre><code>class MyController &lt; ActionController::Base
    responders :flash
    respond_to :html
  
    def create
      @my_object = MyObject.create(params[:my_object])
      respond_with @my_object do |format|
        format.html { redirect_to :back }
      end
    end
  end
  </code></pre>
  
  <p>This works fine in rails 3.2.1 but seems to have stopped working in 3.2.2, there seems to have been some modifications about how respond_with functions when taking a block. Specifically this patch: <a href="https://github.com/rails/rails/pull/4870/files" rel="nofollow">https://github.com/rails/rails/pull/4870/files</a></p>
  
  <p>I was wondering if there's any way to achieve this same behaviour and use the flash responder to set the flash messages (I don't want to have to do it manually).</p>