Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow Serializer#attributes and #relationships to be a function, with access to action instance #346

Open
davewasmer opened this issue Jun 20, 2017 · 1 comment

Comments

@davewasmer
Copy link
Collaborator

This will allow customization of what is sent over the wire based on the action context, i.e. limited public fields for user listing, but admins see everything.

@davewasmer
Copy link
Collaborator Author

This will also allow i.e. global serializer attributes:

class FooSerializer extends ApplicationSerializer {
  attributes() {
    super.attributes().concat([ 'foo', 'bar' ])
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant