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

fieldsets definition support #407

Closed
yoshi12u opened this issue Apr 12, 2019 · 1 comment
Closed

fieldsets definition support #407

yoshi12u opened this issue Apr 12, 2019 · 1 comment

Comments

@yoshi12u
Copy link

yoshi12u commented Apr 12, 2019

Hi team! I'm using FastJsonapi v1.6, and I love it.
Now, however, I want a fieldsets definition support like Blueprinter's view.

My ideal interface is below.

class MovieSerializer
  include FastJsonapi::ObjectSerializer

  attributes :name, :year
  set_fieldset :minimum, { user: [:name] }
end

serializer = MovieSerializer.new(movie, fieldset: :minimum)
serializer.serializable_hash

As I have already implemented this, I'll send a pull request if you agree to my suggestion.

Thanks for your great works!

@yoshi12u
Copy link
Author

Sorry, I missed #362.
I should close this issue.

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

1 participant