josevalim/active_model_serializers — pull request #121 by twinturbo (2012-08-25 15:42:33+00:00)
Title: Easier to work with polymorphic interface

This touches up the interface from #50 making it easy to work with polymorphic associations in Javascript (suggested by @drogus). Here's how polymorphic associations are handled now:

```javascript
// serialize id
{
"association_name": {
"type": "email",
"id": 1
}
}

// serialize object
{
"association_name": {
"type": "email",
"email": { ... }
}
}
```