module FrontHelper def ad_image_link(ad_image) link = ad_image.out_link link = front_show_inner_ad_image_path(:id=> ad_image.id) if link.blank? && !ad_image.context.blank? link end end