Skip to content

Commit 05fd596

Browse files
committed
Setting the content_type sets the response Content-Type
Otherwise we have two headers, 'Content-Type' and 'CONTENT_TYPE'. I don't know when Rails decides to use one or the other.
1 parent 0433869 commit 05fd596

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

lib/active_model_serializers/register_jsonapi_renderer.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ def serialize_jsonapi(json, options)
5757
ActionController::Renderers.add :jsonapi do |json, options|
5858
json = serialize_jsonapi(json, options).to_json(options) unless json.is_a?(String)
5959
self.content_type ||= media_type
60-
headers.merge! ActiveModelSerializers::Jsonapi::HEADERS[:response]
6160
self.response_body = json
6261
end
6362

0 commit comments

Comments
 (0)