mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-15 08:11:41 +00:00
fix: agregado metodo page_not_found en disk_controller_decorator.rb #14378
This commit is contained in:
parent
32fdb4e796
commit
c86507e628
1 changed files with 7 additions and 1 deletions
|
@ -14,7 +14,7 @@ module ActiveStorage
|
||||||
if acceptable_content?(token)
|
if acceptable_content?(token)
|
||||||
named_disk_service(token[:service_name]).upload token[:key], request.body, checksum: token[:checksum]
|
named_disk_service(token[:service_name]).upload token[:key], request.body, checksum: token[:checksum]
|
||||||
|
|
||||||
blob = ActiveStorage::Blob.find_by! token[:key]
|
blob = ActiveStorage::Blob.find_by_key! token[:key]
|
||||||
site = Site.find_by_name token[:service_name]
|
site = Site.find_by_name token[:service_name]
|
||||||
|
|
||||||
site.static_files.attach(blob)
|
site.static_files.attach(blob)
|
||||||
|
@ -27,6 +27,12 @@ module ActiveStorage
|
||||||
rescue ActiveStorage::IntegrityError
|
rescue ActiveStorage::IntegrityError
|
||||||
head :unprocessable_entity
|
head :unprocessable_entity
|
||||||
end
|
end
|
||||||
|
|
||||||
|
private
|
||||||
|
def page_not_found(exception)
|
||||||
|
head :not_found
|
||||||
|
ExceptionNotifier.notify_exception(exception, data: {params: params.to_hash})
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue