You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Only tested this for the simple ApplicationController.render(partial: ... case on Rails 7.0.4, but in case anyone else finds themselves here this patch seems to get it working:
The underlying issue is that jb patches ActionView::TemplateRenderer, but when you call ApplicationController.render(partial: ...) it uses ActionView::PartialRenderer.
Note however that with this patch, calls to render(partial: ... within another view/partial will now also return JSON, which could mess things up with nested partials. Not sure of a good workaround yet other than using JSON.parse inside the views.
This action tries to render
app/views/teas/_tea.json.jbuilder
but fails with
unless I append
.to_json
to the partial. Is this working as intended?The text was updated successfully, but these errors were encountered: