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

JSON-API support for :extends/:decorator with has_one #182

Closed
caseymct opened this issue Jan 8, 2016 · 1 comment
Closed

JSON-API support for :extends/:decorator with has_one #182

caseymct opened this issue Jan 8, 2016 · 1 comment
Milestone

Comments

@caseymct
Copy link

caseymct commented Jan 8, 2016

as per glitter chat:

I have an Event model that has_one host, a User. the User model has it's own (quite large) decorator. It would be great to have

has_one :host, class: User, decorator: UserDecorator

I'd like to avoid doing

has_one :host, class: User, populator: ::Representable::FindOrInstantiate do
  # many properties
end

and duplicating this in every decorator that has a user.

@myabc
Copy link
Contributor

myabc commented Dec 10, 2016

This issue was moved to trailblazer/roar-jsonapi#11

@myabc myabc closed this as completed Dec 10, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants