module Sociyal::Helpers

Public Instance Methods

yashare(opts = {}) click to toggle source
# File lib/sociyal/helpers.rb, line 5
def yashare(opts = {})
  attrs = {
    charset: 'utf-8',
    type:    'text/javascript',
    src:     '//yastatic.net/share/share.js'
  }

  script = content_tag(:script, nil, attrs)
  widget = Sociyal::Widget.new(self, opts)
  html = [script, widget].join("\n")

  raw(html)
end