stravid/slotcars — pull request #119 by DominikGuzei (2012-04-01 11:24:18+00:00)
Title: Chore/integrate rest adapter

Correctly integrates the RESTAdapter provided by ember-data to work with our project. On the rails side it adds the ultra awesome [active model serializers](https://github.com/josevalim/active_model_serializers) which enable clean declaration of how to serialize models to json. This also works out of the box with RESTAdapter.

The missing link was actually extending RESTAdapter and provide the correct ```namespace```attribute on our ApiAdapter ('api'). RESTAdapter uses that exactly for what we want it to use ;-)

The second problem was that RESTAdapter uses the ```toString``` method on models to get their name to build the url. Since we fucked up with embers namespacing we have no correct toString method that would give something like ```Slotcars.shared.models.Track```. So we have to add that manually by reopening the class and overriding the static toString method ourselves.

Have a lot of fun now, because this pull request just removed many hours of tedious work from us :-)