Skip to content

Bug on related_models_with_context with single resource #62

@thibaudgg

Description

@thibaudgg

Hi @valscion,

While testing the v1.0.0.alpha1 release on our app, I got a failing test on the AuthorizingProcessor#related_models_with_context on line 280.

Basically if assoc_value is not an Hash or an Array then assoc_value[:id] should not be used, but rather assoc_value instead. Which would give (and make my test pass):

resource_class.find_by_key(assoc_value, context: context)._model

What do you think? Could you fix that one directly one master or should I submit a PR with a spec?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions