Releases: yosiat/panko_serializer
Releases · yosiat/panko_serializer
v0.1.10
v0.1.9
v0.1.8
v0.1.7
New Feature
Aliases #10
If we have attribute name which we want to expose to the client as another name, the simple way to do it is create new method attribute, for example:
class PostSerializer < Panko::Serializer
attribute :published_at
def published_at
object.created_at
end
end
The downside of this approach is that we get a direct hit on performance - we skip Panko Type Casting performance optimizations (Type Casting - Explanation).
With aliases, we can give created_at
a new name, by creating an alias to it.
class PostSerializer < Panko::Serializer
aliases created_at: :published_at
end
Changes
- Cleaning benchmarks running code
- Adding support to additional_types