Sha256: e4501bb4e82deb14391d24c3581ea96c72098d001d4a9e31424290b7cbf359db
Contents?: true
Size: 330 Bytes
Versions: 3
Compression:
Stored size: 330 Bytes
Contents
module JSONAPI MEDIA_TYPE = 'application/vnd.api+json' end Mime::Type.register JSONAPI::MEDIA_TYPE, :api_json ActionDispatch::ParamsParser::DEFAULT_PARSERS[Mime::Type.lookup(JSONAPI::MEDIA_TYPE)] = lambda do |body| data = JSON.parse(body) data = {:_json => data} unless data.is_a?(Hash) data.with_indifferent_access end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
jsonapi-resources-0.7.1.beta1 | lib/jsonapi/mime_types.rb |
jsonapi-resources-0.7.0 | lib/jsonapi/mime_types.rb |
jsonapi-resources-0.6.2 | lib/jsonapi/mime_types.rb |