Closed morgangrubb closed 1 year ago
ActionView 7.0.7 now expects the rendered object to respond to to_str for caching.
to_str
See https://github.com/rails/rails/pull/48645 / https://github.com/rails/rails/pull/48645/files#diff-3ab26da9762a8bb0310c1e11a230ce1d82d95868ed0c28f6b795b5f3e2b61f3eR99
Depending on how a collection is rendered in jbuilder, this may or may not work.
This errors in ActionView 7.0.7 (worked in ActionView 7.0.6 and earlier):
json.posts do json.array! @posts, partial: "posts/post", as: :post, cached: true end
This works in ActionView 7.0.7:
json.posts do json.partial! "posts/post", collection: @posts, as: :post, cached: true end
I'm not sure if this should be considered an issue in jbuilder or ActionView?
I registered this one under https://github.com/rails/rails/issues/48979
Fixed in https://github.com/rails/rails/pull/48937 (7-0-stable or wait for the next 7.0.x release)
7-0-stable
ActionView 7.0.7 now expects the rendered object to respond to
to_str
for caching.See https://github.com/rails/rails/pull/48645 / https://github.com/rails/rails/pull/48645/files#diff-3ab26da9762a8bb0310c1e11a230ce1d82d95868ed0c28f6b795b5f3e2b61f3eR99
Depending on how a collection is rendered in jbuilder, this may or may not work.
This errors in ActionView 7.0.7 (worked in ActionView 7.0.6 and earlier):
This works in ActionView 7.0.7:
I'm not sure if this should be considered an issue in jbuilder or ActionView?