From e4e3d66f322200c7ae1f7ce5789552b4133e9c39 Mon Sep 17 00:00:00 2001 From: Harry Bomrah Date: Fri, 17 Oct 2014 14:24:15 +0800 Subject: [PATCH] rescue for nil files --- app/controllers/upgrade_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/upgrade_controller.rb b/app/controllers/upgrade_controller.rb index 271b293..fdcf16a 100644 --- a/app/controllers/upgrade_controller.rb +++ b/app/controllers/upgrade_controller.rb @@ -38,7 +38,7 @@ class UpgradeController < ApplicationController } end files = b.bulletin_files.collect do |bf| - file = request.protocol + request.host_with_port + bf.file.url if !bf.file.nil? + file = request.protocol + request.host_with_port + bf.file.url rescue nil { "title" => bf.title_translations, "description" => bf.description_translations,