Serializers
Role of a Serializer
A Serializer is responsible for transforming a data structure into a JSON object. It's the equivalent of a View but for JSON.
Location
app/serializers/
- Should be suffix with
_serializer.rb
Dos
- Use Presenters to query multiple sets of data.
- Use Query Objects to fetch complexe data.
Don'ts
- Same as Views.
Code
TODO