vendredi 21 août 2015

How to configure an ember-rails 1.13 app to work with the JSON API spec?

I have a Rails app that uses ActiveModelSerializers (set to serialize json using the JSON API format) and the ember-data gem to add Ember.js and Ember Data to the asset pipeline. All of the JavaScript is written using CoffeeScript.

We have set our application adapter to use the DS.JSONAPIAdapter:

App.ApplicationAdapter = DS.JSONAPIAdapter.extend
  namespace: 'api/v1'

We are also setting the the serializer:

App.ApplicationSerializer = DS.JSONAPISerializer.extend()

However, we are getting errors when trying to route to the page that lists the models.

How can we configure this correctly?




Aucun commentaire:

Enregistrer un commentaire