<% @ad_banner.ad_images.can_display.each do |ad_image| %>
<% link = ad_image_link(ad_image) %>
<%= image_tag ad_image.file, alt: ad_image.title, title: ad_image.title, width: @ad_banner.width, height: @ad_banner.height, link_open: ad_image.link_open, link_url: link, style: "#{'cursor:pointer;' if link.present?}" %>
<%= %>
<% end %>