Open Mikkko opened 2 years ago
Is it possible to pass serializer name as parameter with a single attribute? attribute :attribute_name, serializer: SerializerName
attribute :attribute_name, serializer: SerializerName
instead of:
attribute :attribute_name do |object| SerializerName.new(object.attribute_name) end
We can do it with relationships, when we call has_many or another type, but I cannot find it for single attribute
Is it possible to pass serializer name as parameter with a single attribute?
attribute :attribute_name, serializer: SerializerName
instead of:
We can do it with relationships, when we call has_many or another type, but I cannot find it for single attribute