Open
Description
In the following docs example :string turns into a key in the serialized hash
Specifying the type is seemingly pointless even if it worked, what's it for?
The type of a computed attribute (like :full_name above) is not easily calculated without some sophisticated static code analysis. To specify the type of a computed attribute:
class PersonSerializer < ActiveModel::Serializer
attributes :first_name, :last_name, {:full_name => :string}
def full_name
"#{object.first_name} #{object.last_name}"
end
end