Skip to content

Sideload names don't convert from camel case to underscore #112

Open
@calebuharrison

Description

@calebuharrison

Hi! Thanks for all the work put into this fantastic project.

I noticed that there aren't any examples of sideloading relationships that are multi-word. When using this suite as a whole, the API expects all attributes and relationships to be underscored, while the client expects them to be camelcase. While attributes are converted automatically, the following line doesn't work:

User.includes("multiWordRelationship").all()

From what I can tell, the string passed to includes is injected as-is into the URL, without being underscored. This means I have to use this in the client in order for the side load to work:

User.includes("multi_word_relationship").all()

It works, but it's a bit inconsistent. Is there already a solution in place for this that I'm missing?

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions