Skip to content

Instantly share code, notes, and snippets.

@typeoneerror
Created August 9, 2015 18:48
Show Gist options
  • Select an option

  • Save typeoneerror/ea8a6038b2f9152db18d to your computer and use it in GitHub Desktop.

Select an option

Save typeoneerror/ea8a6038b2f9152db18d to your computer and use it in GitHub Desktop.
Getting ember-data to play nice with PATCH and active_model_serializers
# config/initializers/active_model_serializers.rb
ActiveModel::Serializer.config.adapter = ActiveModel::Serializer::Adapter::JsonApi
api_mime_types = %W(
application/vnd.api+json
text/x-json
application/json
)
Mime::Type.unregister :json
Mime::Type.register 'application/json', :json, api_mime_types
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment