josevalim/active_model_serializers — pull request #36 by jballanc (2012-02-08 10:11:40+00:00)
Title: Create custome attributes by passing a block

This change allows for the creation of attributes to be serialized that do not necessarily exist on the model being serialized. A
block can be passed to the definition of a singular attribute and that block will be evaluated in the context of the model object
being serialized. The return value of the block is then used as the value of the attribute for serialization. For example:

```ruby
class UserSerializer < ActiveModel::Serializer
attribute :full_name do
"#{first_name} #{last_name}"
end
end
```