tricknotes / ember-cli-rails

Unify your EmberCLI and Rails Workflows
http://thoughtbot.github.io/ember-cli-rails/
MIT License
712 stars 205 forks source link

Support for JSON API spec? #447

Closed pnachum closed 8 years ago

pnachum commented 8 years ago

New Ember projects use JSONAPIAdapter by default and expect API responses to match the JSON API spec. But getting Rails to serialize models according to this format is pretty hard.

I always find this to be a pain point when starting new Ember/Rails projects. I've settled on using ActiveModelAdapter and ActiveModelSerializer instead, and I put together a boilerplate to make that a little easier.

However, boilerplates are a bad solution. I would much prefer it if using ember-cli-rails just worked out of the box, or came with a very easy configuration step to make it work, so that Rails and Ember can communicate with each other properly.

seanpdoyle commented 8 years ago

@philpee2 thanks for opening this issue and getting the discussion started.

This gem's main concern is integrating EmberCLI and Rails at the server/build level.

While I agree with your proposal in spirit, I think integration between Ember-Data and a Rails-based JSONAPI server is out of scope for this project.

However, I'd love to look over your proposed solution. If you'd like, please open a PR. Based on your implementation, we can decide what to do with the code.