small fix for base image

This commit is contained in:
Harry Bomrah 2015-11-25 21:28:27 +08:00
parent 4ed005b063
commit 46c67cc0ab
1 changed files with 2 additions and 1 deletions

View File

@ -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"
},