yui/yui3 — pull request #618 by hojberg (2013-04-15 23:00:10+00:00)
Title: ModelSync.REST: Add resourcePrefix

Web frameworks like Rails, add a resource prefix be default to JSON returned.

This adds an option to ModelSync.REST to provide a `resourcePrefix` that will
automatically be added on `save()` and removed on `load()`

A prefixed response looks something like this:
```
GET /user/1.json

{
"user": {
"name": "Simon"
}
}
```

@ericf There are several ways to achieve this, I went down a few paths and ended up on this, because it has no impact on current consumption of ModelSync.REST.
I particularly like my `_addResourcePrefix` method - Would love suggestions.