Skip to content
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

Remove Custom Array-like Class Configuration #428

Closed
wants to merge 2 commits into from

Conversation

lessthanjacob
Copy link
Contributor

Changelog

  • Removes custom array-like configuration in favor of depending on an interface (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:

  • [X ] I have updated the necessary documentation
  • [X ] I have signed off all my commits as required by DCO
  • My build is green

@lessthanjacob lessthanjacob self-assigned this Jun 24, 2024
@jhollinger
Copy link
Contributor

jhollinger commented Jun 24, 2024

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.

@lessthanjacob
Copy link
Contributor Author

Will revisit at a later time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants