Module: Middleman::FacebookPixel::Helpers
- Defined in:
- lib/middleman-facebook-pixel/helpers.rb
Instance Method Summary collapse
Instance Method Details
#facebook_pixel ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/middleman-facebook-pixel/helpers.rb', line 6 def facebook_pixel # get configuration options = extensions[:facebook_pixel]. # path to Facebook Pixel template path = File.join(File.dirname(__FILE__), 'facebook-pixel.html.erb') # set template context context = {options: } # init ERB engine erb = Erubis::FastEruby.new(File.read(path)) # return compiled HTML erb.evaluate(context) end |