Module: AdMan::ApplicationHelper

Included in:
AdvertisementsController
Defined in:
app/helpers/ad_man/application_helper.rb

Instance Method Summary collapse

Instance Method Details



13
14
15
# File 'app/helpers/ad_man/application_helper.rb', line 13

def js_link_to_ad(keyword)
  ad_select(keyword)
end


3
4
5
6
7
8
9
10
11
# File 'app/helpers/ad_man/application_helper.rb', line 3

def link_to_ad(opts = {})
  opts.slice!(:size,:keyword)
  keyword = opts[:keyword]
  size = opts[:size] || "leaderboard"
  ad = ad_select(keyword)
  if ad 
    link_to image_tag(ad.ad_banner.url(size)), ad_man.click_through_advertisements_path(ad.id), :target => '_blank', :method => :post
  end
end