Module: Yashare::Helpers
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/yashare/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/yashare/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) = Yashare::Widget.new(self, opts) html = [script, ].join("\n") raw(html) end |