Module: BannersHelper
- Defined in:
- app/helpers/google_banners_helper.rb
Instance Method Summary collapse
Instance Method Details
#google_banner_code(place, klass = 'banner') ⇒ Object
2 3 4 5 6 |
# File 'app/helpers/google_banners_helper.rb', line 2 def (place, klass = 'banner') content_tag :div, google_slot(place).try(:html_safe), class: klass end |
#google_slot(slot) ⇒ Object
8 9 10 11 12 13 |
# File 'app/helpers/google_banners_helper.rb', line 8 def google_slot(slot) if controller.respond_to? :add_google_slot controller.add_google_slot(slot) content_tag :script, raw("GA_googleFillSlot(\"#{slot}\");"), :type => 'text/javascript' end end |