Netflix / fast_jsonapi

No Longer Maintained - A lightning fast JSON:API serializer for Ruby Objects.
Apache License 2.0
5.07k stars 425 forks source link

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

Open Faisal-nfl opened 4 years ago

Faisal-nfl commented 4 years ago

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 commented 4 years ago

@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