From 83b29bbd8ae208ee341e41b1c8d2dd661ad19c11 Mon Sep 17 00:00:00 2001 From: maki Date: Thu, 6 Jun 2024 16:24:16 -0300 Subject: [PATCH] =?UTF-8?q?fix:=20m=C3=A9todos=20en=20disk=5Fcontroller=5F?= =?UTF-8?q?decorator.rb=20#102?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../active_storage/disk_controller_decorator.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/controllers/active_storage/disk_controller_decorator.rb b/app/controllers/active_storage/disk_controller_decorator.rb index 07a166c3..0364efa9 100644 --- a/app/controllers/active_storage/disk_controller_decorator.rb +++ b/app/controllers/active_storage/disk_controller_decorator.rb @@ -11,7 +11,7 @@ module ActiveStorage # Permitir incrustar archivos subidos (especialmente PDFs) desde # otros sitios. def show - original_show.tap do |s| + original_show.tap do |_s| response.headers.delete 'X-Frame-Options' end end @@ -57,7 +57,7 @@ module ActiveStorage end def limits(max_upload_size, max_download_size) - ruby_hash = { "max_upload_size": max_upload_size, "max_download_size": max_download_size } + ruby_hash = { max_upload_size: max_upload_size, max_download_size: max_download_size } json_string = JSON.generate(ruby_hash) end @@ -69,15 +69,15 @@ module ActiveStorage def page_not_found(exception) head :not_found - ExceptionNotifier.notify_exception(exception, data: {params: params.to_hash}) + ExceptionNotifier.notify_exception(exception, data: { params: params.to_hash }) end def max_upload_size - max_upload_size_mbs = ENV['MAX_UPLOAD_SIZE'].to_i.megabytes + ENV['MAX_UPLOAD_SIZE'].to_i.megabytes end def max_download_size - max_download_size_mbs = ENV['MAX_DOWNLOAD_SIZE'].to_i.megabytes + ENV['MAX_DOWNLOAD_SIZE'].to_i.megabytes end end end