rails/rails — Issue #5280: ActionController: Passing a block to respond_with does not run the responder.
Author: mariovisic
Created: 2012-03-05 14:54:13+00:00
State: open

In my application i'm using the flash responder provided by the responders gem (http://github.com/plataformatec/responders)
When upgrading to rails 3.2.2 from 3.2.1 some of my flash messages stopped working. If I have a regular respond with then it works fine. So this works fine

``` ruby
def my_action
respond_with current_user
end
```

But if I give respond_with a block then it no longer displays the flash messages. This used to work but no longer works:

``` ruby
def my_action
respond_with current_user do |format|
format.html { redirect_to root_url }
end
end
```

It seems as though the responder is never called when a block is defined for respond_with. I have managed to get a failing test case over here https://github.com/mariovisic/rails/commit/defa3626f672963947efae9a2431cbbd6cf725ae

I've had a tinker to fix the problem but without any luck. Was wondering if someone could take a look?

Cheers