We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When my controller returns 304 result, the render_component fails with this error:
undefined method `redirect_url' for []:Array
on this line:
response = component_response(options, true)[2] ** if response.redirect_url ** redirect_to response.redirect_url else render :text => response.body, :status => response.status end
The reason is because controller.dispatch(action, request) returns an array with:
controller.dispatch(action, request)
[304, {"ETag"=>"....", "Cache-Control"=>"max-age=0, private, must-revalidate"}, []]
instead of the 200 result which looks like:
[200, {"Content-Type"=>"text/html; charset=utf-8", "ETag"=>"\"...\"", "Cache-Control"=>"max-age=0, private, must-revalidate }, #<ActionDispatch::Response:0x007f8eee1918b8 @writer=...
Tried to add request_env["Cache-Control"] = "no-store, no-cache, must-revalidate" as a header but no luck.
request_env["Cache-Control"] = "no-store, no-cache, must-revalidate"
The text was updated successfully, but these errors were encountered:
No branches or pull requests
When my controller returns 304 result, the render_component fails with this error:
on this line:
The reason is because
controller.dispatch(action, request)
returns an array with:instead of the 200 result which looks like:
Tried to add
request_env["Cache-Control"] = "no-store, no-cache, must-revalidate"
as a header but no luck.The text was updated successfully, but these errors were encountered: