Been a while since I’ve last worked with that code but doesn’t a collection
cache render return a collection of rendered HTML strings?
I think you might be able to stitch the objects and their rendered HTML
together like this:
@posts.zip(render(partial: ’posts/post’, collection: @posts, cached: true))
Though overall, I don’t think we’re going to change the interface here. Thanks!
:)
> Den 5. mar. 2017 kl. 10.06 skrev Gleb Mazovetskiy <[email protected]>:
>
> Here is an example implementation:
> https://github.com/thredded/thredded/pull/536/files#diff-00110786c7c8a611fd05432b7fb15270
>
> <https://github.com/thredded/thredded/pull/536/files#diff-00110786c7c8a611fd05432b7fb15270>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Core" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected]
> <mailto:[email protected]>.
> To post to this group, send email to [email protected]
> <mailto:[email protected]>.
> Visit this group at https://groups.google.com/group/rubyonrails-core
> <https://groups.google.com/group/rubyonrails-core>.
> For more options, visit https://groups.google.com/d/optout
> <https://groups.google.com/d/optout>.
--
Kasper
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Core" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/rubyonrails-core.
For more options, visit https://groups.google.com/d/optout.