Skip to content

:only option on has_many not working #1943

@HoneyryderChuck

Description

@HoneyryderChuck

Expected behavior vs actual behavior

I have the following set in a serializer:

Parent < ParentSerializer
  has_many :items, only: %i(hostname)
end

But instead of filtering all the other attributes, it returns them all. This was something that was working with version 0.9.3, but apparently it is not anymore in 0.10.2.

Is it a bug?

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