Skip to content

0.1.1.beta6 + active_model_serializers include: "blargh.**" and "blargh.*" appears to be broken #53

@ghost

Description

Using active_model_serializers version 0.10.2 and rails 4.2.7.1

I'm currently trying to get this down to an easy test that you can reproduce but thought I'd go ahead and report it while I work on making it.

We have an app with a render invocation using activemodel_serializers that looks like:

render json: @object,
           adapter: :json,
           root: 'something', 
           include: 'blah, blargh.**',

There's some other render options provided that shouldn't matter.

With jsonapi 0.1.1.beta2 this works as expected and there is a blargh key with nested stuff under it in the resulting json.

However, with jsonapi 0.1.1.beta6 there is no blargh key at all. If I remove the .** then the blargh key is back and has data, but obviously no nesting. If I switch to just blargh.* I get the same bad result as .** where I have no blargh key.

I will work on getting that test ready so you can take a look yourself. I'm "blaming" this on jsonapi gem instead of active_model_serializers because upgrading the jsonapi gem is the direct cause of the breakage.

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