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

Make has_many relationships return an empty collection when no parent #367

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

x-yuri
Copy link
Contributor

@x-yuri x-yuri commented Jul 22, 2020

Fixes #366.

It supposedly needs ruby >= 2.3.0. It probably affects other types of relationships. Some tests regarding nesting becomes not needed. Should I proceed in this direction, or double back and just make it work for (not deeply) nested collections, and not introduce Hash#dig?

@x-yuri x-yuri force-pushed the relationships-nested-under branch from dd0afcd to 7bda03b Compare July 22, 2020 11:41
@SimonMiaou
Copy link
Collaborator

Hey @x-yuri

Sorry for the late late reply,
This looks good, if you're still up to it, we'll be happy that you continue contributing

@bobbrodie bobbrodie added the Enhancement Enhancements to existing features label Apr 2, 2024
@bobbrodie bobbrodie added this to the v3.0.0 milestone May 27, 2024
@x-yuri
Copy link
Contributor Author

x-yuri commented May 28, 2024

if you're still up to it, we'll be happy that you continue contributing

I haven't used this project since that time, and I don't even remember what exactly this PR changes. So unfortunately no :(

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

Successfully merging this pull request may close these issues.

it bails out when asked for an empty nested has_many relationship (undefined method `[]' for nil:NilClass)
3 participants