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

do i need to always give serializer name or it can auto pick #449

Open
Faisal-nfl opened this issue Nov 25, 2019 · 1 comment
Open

do i need to always give serializer name or it can auto pick #449

Faisal-nfl opened this issue Nov 25, 2019 · 1 comment

Comments

@Faisal-nfl
Copy link

Faisal-nfl commented Nov 25, 2019

using grape for apis and
What I see that I have to give always provide serializer name like
CompanySerializer.new(Company.all).serializable_hash

wondering if it can auto pick serialzier name depending upon resource name or object type like it used to do with active mode serializer.

and what about using Serializer in in relation like with has_many

@EmCousin
Copy link

@Faisal-nfl I think this is mostly Grape related. You can override the formatter to do so.
The gem grape_fast_jsonapi does just that. Feel free to have a look at it and give it a try

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

2 participants