orbit-basic/app/helpers/admin/ad_banner_helper.rb

16 lines
381 B
Ruby
Raw Normal View History

2012-01-31 10:31:31 +00:00
module Admin::AdBannerHelper
2012-04-09 04:44:08 +00:00
def preview_block_ad_images_helper(ad_banner)
2012-04-01 15:39:49 +00:00
printable_ad_images = []
ad_banner.ad_images.each do |ad_image|
if ad_image.display?
ad_image.weight.times do
printable_ad_images << ad_image
end
end
end
printable_ad_images.shuffle!
2012-04-09 04:44:08 +00:00
end
2012-04-01 15:39:49 +00:00
2012-01-31 10:31:31 +00:00
end