Skip to content
This repository was archived by the owner on Apr 13, 2025. It is now read-only.
This repository was archived by the owner on Apr 13, 2025. It is now read-only.

Monkeypatch of Virtus for empty arrays to be coerced to nil causes unintended consequences #136

@ghost

Description

There was a similar issue with #113 which was fixed by patching the monkeypatch. But we are using a gem which expects empty arrays to stay as empty arrays.

The discussion here: 27599e7#r16125838 suggests that the required coercion is different from what Virtus does.

My suggestion is to create the NullifyEmpty class as suggested and move TrackerAPI specific behavior into it. Otherwise TrackerAPI is conflicting with other gems.

The behavior needed is a Custom Coersion which would be added to the Shared::Base

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions