mistake commit
This commit is contained in:
1 parent
dddd1f33fd
commit
2608b72d65
6 files changed
+49
-1
No files matched your search
@@ -16,6 +16,15 @@ class AdBanner
|
||||
|
||||
embeds_many :ad_images, :cascade_callbacks => true
|
||||
|
||||
FX_TYPES = ["blindX","blindY","blindZ","cover","curtainX","curtainY","fade","fadeZoom","growX","growY","scrollUp","scrollDown","scrollLeft","scrollRight","scrollHorz","scrollVert","shuffle","slideX","slideY","toss","turnUp","turnDown","turnLeft","turnRight","uncover","wipe","zoom"]
|
||||
|
||||
def display?
|
||||
if (self.post_date <= Date.today && (self.unpost_date.nil? || self.unpost_date>= Date.today))
|
||||
return true
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
def new_ad_images=(*attrs)
|
||||
attrs[0].each do |attr| #Loop by JSs,Themes,Imgs
|
||||
unless attr[:file].nil?
|
||||
|
||||
@@ -13,4 +13,13 @@ class AdImage
|
||||
|
||||
embedded_in :ad_banner
|
||||
|
||||
def get_delay_time
|
||||
time = ''
|
||||
if self.time_to_next.nil?
|
||||
time = '1000'
|
||||
else
|
||||
time = (self.time_to_next.to_i * 1000).to_s
|
||||
end
|
||||
time
|
||||
end
|
||||
end
|
||||
Reference in new issue
Block a user