diff --git a/app/controllers/ad_banners_controller.rb b/app/controllers/ad_banners_controller.rb index bf11795..313f38d 100644 --- a/app/controllers/ad_banners_controller.rb +++ b/app/controllers/ad_banners_controller.rb @@ -21,7 +21,7 @@ class AdBannersController < ApplicationController images = [] adbanner.ad_images.can_display.order_by(is_top: -1, sort_number: 1, created_at: 1).each.with_index do |b,i| if b.language_enabled.include?(I18n.locale.to_s) - image_link = OrbitHelper.is_mobile_view ? b.file.mobile.url : b.file.url + image_link = (OrbitHelper.is_mobile_view ? b.file.mobile.url : b.file.url) + "?v=#{b.updated_at.to_i}" klass = i == 0 ? "active" : "" caption = i == 0 ? '
' : "" banner_title = b.title.to_s diff --git a/app/views/admin/ad_banners/show.html.erb b/app/views/admin/ad_banners/show.html.erb index 1b7927d..0267d4d 100644 --- a/app/views/admin/ad_banners/show.html.erb +++ b/app/views/admin/ad_banners/show.html.erb @@ -55,13 +55,13 @@ <%= t(:top) %> <% end %> <% if image.exchange_item == "1" %> - <%= image_tag image.file.thumb, :class => "banner-image" %> + <%= image_tag "#{image.file.thumb.url}?v=#{image.updated_at.to_i}", :class => "banner-image" %> <% elsif image.exchange_item == "2" %> <% elsif image.exchange_item == "3" %> <% video_snapshot_url = "" - video_snapshot_url = image.video_snapshot.url if image.video_snapshot.file %> + video_snapshot_url = "#{image.video_snapshot.url}?v=#{image.updated_at.to_i}" if image.video_snapshot.file %>