Closed lessthanjacob closed 3 months ago
I like the direction here. But I do think that these kinds of heuristics will always fail someone. So IMHO the important thing is to allow the user to recover from that. What if render
called out to render_one
or render_all
? Then if render
gets it wrong for \<insert obscure collection object>, the user could call render_one
or render_all
directly. We'd also need a
"hint option" for associations...
FWIW, render_one
/render_all
may not be the most descriptive names. render_object
and render_collection
? Or just options passed to render
, maybe.
Will revisit at a later time.
Changelog
Enumerable
in this case).Hash
is an exception here due to existing implementation details.Discussion
This was previously discussed as an option, but was decided against due to potentially be too open.
Checklist: