Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

ActionController: Passing a block to respond_with does not run the responder. #5280

Closed
mariovisic opened this Issue · 0 comments

2 participants

Mario Visic Prem Sichanugrist
Mario Visic

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

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:

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 mariovisic@defa362

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

Cheers

Prem Sichanugrist sikachu was assigned
Prem Sichanugrist sikachu referenced this issue from a commit in sikachu/rails
Prem Sichanugrist sikachu Always passing a respond block from to responder
We should let the responder to decide what to do with the given
overridden response block, and not short circuit it.

Fixes #5280
284041c
Prem Sichanugrist sikachu closed this issue from a commit
Prem Sichanugrist sikachu Always passing a respond block from to responder
We should let the responder to decide what to do with the given
overridden response block, and not short circuit it.

Fixes #5280
82a8698
Prem Sichanugrist sikachu closed this in 82a8698
joshuap joshuap referenced this issue from a commit
Commit has since been removed from the repository and is no longer available.
Anuj Dutta andhapp referenced this issue from a commit
Commit has since been removed from the repository and is no longer available.
Anuj Dutta andhapp referenced this issue from a commit
Commit has since been removed from the repository and is no longer available.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.