Module: AdMan::ApplicationHelper
- Included in:
- AdvertisementsController
- Defined in:
- app/helpers/ad_man/application_helper.rb
Instance Method Summary collapse
Instance Method Details
#js_link_to_ad(keyword) ⇒ Object
13 14 15 |
# File 'app/helpers/ad_man/application_helper.rb', line 13 def js_link_to_ad(keyword) ad_select(keyword) end |
#link_to_ad(opts = {}) ⇒ Object
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..url(size)), ad_man.click_through_advertisements_path(ad.id), :target => '_blank', :method => :post end end |