Updating RESTAdapter to work with Rails JSON, and CORS