amaltson/dev-days-2014 — pull request #10 by amaltson (2014-06-10 21:13:22+00:00)
Title: Active model serializer

Not sure if we want to merge this in yet, but these changes customize the JSON serialization to have Instances return Endpoints. So when you get a resource like `/services/1/instances/1`, you get:

```
{
"description": null,
"endpoints": [
{
"created_at": "2014-06-09T20:24:13.396Z",
"description": "WESB mediation to version 4",
"endpoint_type": "WESB mediation",
"id": 2,
"instance_id": 1,
"name": "Development.WESB.commutedValueService4",
"updated_at": "2014-06-09T20:24:13.410Z",
"url": "http://indy:8889/gateway2MediationWeb/sca/gateway2Export_WS_SOAP11/cvws4"
},
{
"created_at": "2014-06-09T20:24:13.389Z",
"description": "Direct endpoint to version 4",
"endpoint_type": "Direct",
"id": 1,
"instance_id": 1,
"name": "commutedValueService4",
"updated_at": "2014-06-09T20:24:13.408Z",
"url": "http://ihswasdev/CommutedValueWS400/CommutedValueService"
}
],
"id": 1,
"name": "Commuted Value Service 4",
"version_of_artifact": "4.0.0 [2013-11-05 18:26:00 EST]"
}
```

So we can leave this branch up here to demonstrate how Active Model Serializer works.

/cc @melima @nasimoyz