You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
classEventTypesControllerdefshow@event_type=EventType.find(params[:id])@options={include: [:events],# can i do something at this level ?is_collection: false}renderjson: EventTypeSerializer.new(@event_type,@options).serialized_jsonendend
The issue is some event type have thousands of events.
My question is, how can I paginate events on the event_type show view. Should I make a custom attribute for events in EventTypeSerializer ? Then events won't show in relationships. Should this logic be in the controller ?
The text was updated successfully, but these errors were encountered:
Hello,
I'm using fast_jsonapi on a project and was wondering how to paginate relations without breaking the logic.
Currently, I have those serializers :
and this controller
The issue is some event type have thousands of events.
My question is, how can I paginate events on the event_type show view. Should I make a custom attribute for events in EventTypeSerializer ? Then events won't show in relationships. Should this logic be in the controller ?
The text was updated successfully, but these errors were encountered: