Module: AdifyHelper
- Included in:
- ActionView::Base
- Defined in:
- lib/adify/helper.rb
Instance Method Summary collapse
Instance Method Details
#adify_tag(args) ⇒ Object
3 4 5 6 7 8 9 |
# File 'lib/adify/helper.rb', line 3 def adify_tag(args) item = args.delete(:item) rescue nil partial = args.delete(:partial) || 'adify/dfp' tag_attributes = adification(item).merge(args) #pass in the hash as a parameter too in case they need all the value but don't know the names render :partial => partial, :locals => tag_attributes.merge(:tag_attributes => tag_attributes.clone) end |
#random(length) ⇒ Object
11 12 13 |
# File 'lib/adify/helper.rb', line 11 def random(length) Array.new(length){rand 9}.join end |
#tag_number ⇒ Object
15 16 17 |
# File 'lib/adify/helper.rb', line 15 def tag_number @controller.class.adify_tag_number += 1 end |