mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-23 06:16:50 +00:00
Merge pull request #1712 from bf4/fix_jsonapi_response_header
Setting the content_type sets the response Content-Type
This commit is contained in:
commit
2b49899351
@ -57,7 +57,6 @@ end
|
||||
ActionController::Renderers.add :jsonapi do |json, options|
|
||||
json = serialize_jsonapi(json, options).to_json(options) unless json.is_a?(String)
|
||||
self.content_type ||= media_type
|
||||
headers.merge! ActiveModelSerializers::Jsonapi::HEADERS[:response]
|
||||
self.response_body = json
|
||||
end
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user