Module: Sociyal::Helpers

Extended by:
ActiveSupport::Concern
Defined in:
lib/sociyal/helpers.rb

Instance Method Summary collapse

Instance Method Details

#yashare(opts = {}) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/sociyal/helpers.rb', line 5

def yashare(opts = {})
  attrs = {
    charset: 'utf-8',
    type:    'text/javascript',
    src:     '//yastatic.net/share/share.js'
  }

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

  raw(html)
end