Skip to content
This repository has been archived by the owner on Jan 25, 2022. It is now read-only.

Commit

Permalink
クリップ詳細: 拡大画像を取得できない場合は例外エラーを回避
Browse files Browse the repository at this point in the history
  • Loading branch information
YOSHIDA Hiroki committed Feb 21, 2014
1 parent 62e6492 commit 69d80ab
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/controllers/images_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 69d80ab

Please sign in to comment.