Is it possible to pass serializer name as parameter with a single attribute?
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