From 6a2525bd6580741149e84c1cdfabf80605a53301 Mon Sep 17 00:00:00 2001 From: Harry Bomrah Date: Tue, 6 Oct 2015 15:30:59 +0800 Subject: [PATCH] default speed added --- app/controllers/ad_banners_controller.rb | 2 +- app/models/banner.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/ad_banners_controller.rb b/app/controllers/ad_banners_controller.rb index 7aef2c3..cb660f0 100644 --- a/app/controllers/ad_banners_controller.rb +++ b/app/controllers/ad_banners_controller.rb @@ -32,7 +32,7 @@ class AdBannersController < ApplicationController "ad_fx" => adbanner.ad_fx, "speed" => adbanner.speed, "title" => adbanner.title, - "timeout" => adbanner.timeout, + "timeout" => (adbanner.timeout * 1000), "more" => "More" }, "images" => images diff --git a/app/models/banner.rb b/app/models/banner.rb index 1eb75ff..8295303 100644 --- a/app/models/banner.rb +++ b/app/models/banner.rb @@ -8,7 +8,7 @@ class Banner field :height, type: Integer field :speed, type: Integer field :title, type: String - field :timeout, type: Integer + field :timeout, type: Integer, default: 5 field :width, type: Integer has_many :ad_images , dependent: :delete