I have a controller action that redirects, and I want to replace the response with render.
Yes, I know. "return early".
That will not work for this use case.
I want to change the response from DoorKeeper. This controller inherits from DoorKeeper and the DoorKeeper controller calls redirect_to.
My controller looks like this:
def new
super
render inline: ...
end
So, I am looking for a way to cancel the call to redirect_to in super.
I tried response = ActionDispatch::Response.new, but surprisingly that did not help.
Contrary to popular opinion, this is quite easy to do.