emberjs/data — pull request #1058 by marcoow (2013-06-28 14:11:26+00:00)
Title: Errors on embedded records

I changed `RestAdapter.didError` so that it will also recognize errors on embedded errors. If you have a `POST` or `PUT`/`PATCH` request like this:

```json
{
person: {
name: '',
group: {
name: ''
}
}
}
```

with a response like this:

```json
{
errors: {
name: ['cannot be empty'],
group.name: ['cannot be empty']
}
}
```

it will set the correct states and assign the errors not only on the person but also on the embedded group record.

**This is most likely not ready to merge yet** as I'm new to ember and probably missed some important stuff. Also it should probably support more than one level of embedding which it currently doesn't. Also I'm not sure whether the way described above is the best way to return errors for embedded records or whether it should maybe look like this:

```json
{
errors: {
name: ['cannot be empty'],
group: {
name: ['cannot be empty']
}
}
}
```