emberjs/data — pull request #823 by zachriggle (2013-03-20 01:58:09+00:00)
Title: Added Grails Adapter, Serializer, and Tests

Grails is a web application framework supported by VMWare and SpringSource, which allows the rapid creation of database-backed web applications. It also allows for quickly and simply converting Domain objects (the back-end equivalent of Ember's models) to and from JSON.

This pull request includes a new `DS.GrailsAdapter` (extends RESTAdapter) and `DS.GrailsSerializer` (extends JSONSerializer) and tests, which allows easy interoperability with the default Grails JSON serializer/deserializer.

In short, the changes are:
- No pluralization
- No decamelization
- URL generation is based on de-titled Model (`App.MyCoolModel` ==> `/myCoolModel`)
- Asserts if the `namespace` is not specifically overridden, providing Grails-specific assistance for setting the value.
- Grails serializes `hasOne` and `belongsTo` relationships as a hash that contains an `id` key, rather than Ember's default behavior of a integral ID value.