From 46c67cc0abea7ee69cd17e9a842dcac9a89aaaea Mon Sep 17 00:00:00 2001 From: Harry Bomrah Date: Wed, 25 Nov 2015 21:28:27 +0800 Subject: [PATCH] small fix for base image --- app/controllers/ad_banners_controller.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/ad_banners_controller.rb b/app/controllers/ad_banners_controller.rb index 08fdca7..f6499af 100644 --- a/app/controllers/ad_banners_controller.rb +++ b/app/controllers/ad_banners_controller.rb @@ -27,6 +27,7 @@ class AdBannersController < ApplicationController "target" => target } end + base_image = adbanner.base_image.nil? ? 1 : adbanner.base_image { "extras" => { "ad_fx" => adbanner.ad_fx, @@ -34,7 +35,7 @@ class AdBannersController < ApplicationController "title" => adbanner.title, "banner-height" => adbanner.height, "banner-width" => adbanner.width, - "base_image" => (adbanner.base_image - 1), + "base_image" => (base_image - 1), "timeout" => (adbanner.timeout * 1000), "more" => "More" },