From 69d80ab423e3f680e4eca6ea22318e23f8641588 Mon Sep 17 00:00:00 2001 From: YOSHIDA Hiroki Date: Fri, 21 Feb 2014 08:39:53 +0900 Subject: [PATCH] =?UTF-8?q?=E3=82=AF=E3=83=AA=E3=83=83=E3=83=97=E8=A9=B3?= =?UTF-8?q?=E7=B4=B0:=20=E6=8B=A1=E5=A4=A7=E7=94=BB=E5=83=8F=E3=82=92?= =?UTF-8?q?=E5=8F=96=E5=BE=97=E3=81=A7=E3=81=8D=E3=81=AA=E3=81=84=E5=A0=B4?= =?UTF-8?q?=E5=90=88=E3=81=AF=E4=BE=8B=E5=A4=96=E3=82=A8=E3=83=A9=E3=83=BC?= =?UTF-8?q?=E3=82=92=E5=9B=9E=E9=81=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/images_controller.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/controllers/images_controller.rb b/app/controllers/images_controller.rb index c4b4185..86fe0ef 100644 --- a/app/controllers/images_controller.rb +++ b/app/controllers/images_controller.rb @@ -10,7 +10,9 @@ def show image.create_thumb_cache_file unless File.exist? image.thumb_path send_data File.binread(image.thumb_path) else - send_data image.open_image.read + # エラーメールが大量に飛ぶのを避ける為に、 + # 拡大画像が取得できない場合は空レスポンスを返す + send_data image.open_image.read rescue render nothing: true end end end