-
Notifications
You must be signed in to change notification settings - Fork 21.4k
New issue
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
Specifying a partial format impacts subsequent partials #35222
Comments
This is a dup of #34138 |
I think this PR introduced broken behavior: #6626 |
tenderlove
added a commit
that referenced
this issue
Feb 12, 2019
tenderlove
added a commit
that referenced
this issue
Feb 12, 2019
This commit keeps a stack of lookup contexts on the ActionView::Base instance. If a format is passed to render, we instantiate a new lookup context and push it on the stack, that way any child calls to "render" will use the same format information as the parent. This also isolates "sibling" calls to render (multiple calls to render in the same template). Fixes #35222 #34138
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Steps to reproduce
Make an app with one template and three partials. The template should be HTML, two XML partials, and one HTML partial:
Expected behavior
I would expect the HTML
users/second
partial to be rendered.Actual behavior
The XML
users/second
partial is rendered.The problem is that rendering the XML format template mutates the lookup context causing "XML" to be the top priority for subsequent renders.
The text was updated successfully, but these errors were encountered: