1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Add explicit rendering to DiskController#update

This avoids unhelpful messages in the logs:
```
No template found for ActiveStorage::DiskController#update, rendering head :no_content
```
This commit is contained in:
Justin Coyne 2021-09-17 13:32:28 -05:00 committed by GitHub
parent 1b0c914133
commit 31780364b7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -23,6 +23,7 @@ class ActiveStorage::DiskController < ActiveStorage::BaseController
if token = decode_verified_token
if acceptable_content?(token)
named_disk_service(token[:service_name]).upload token[:key], request.body, checksum: token[:checksum]
head :no_content
else
head :unprocessable_entity
end