I'm using an around filter which on certain occasions should redirect user to other path AFTER an action has been yielded (either ending with render or redirect).
Writing redirect_to
in around filter after yield statement results in double render error. Trying to "reconfigure" response object (by setting body
to nil
and location
header to desired url) results in folloing error (taken from controller specs):
Failure/Error: Unable to find matching line from backtrace You have a nil object when you didn't expect it! You might have expected an instance of Array. The error occurred while evaluating nil.each
Has anybody done anything similar to this?