Sha256: 227f50e365888153acfed30e5f6848d298340a0e5ea8d7c37159127cf84ed83e
Contents?: true
Size: 818 Bytes
Versions: 2
Compression:
Stored size: 818 Bytes
Contents
# coding: utf-8 module SocialShareButton module Helper def social_share_button_tag(title = "", opts = {}) rel = opts[:rel] html = [] html << "<div class='social-share-button' data-title='#{title}'>" SocialShareButton.config.allow_sites.each do |name| link_title = [t("social_share_button.share_to"),t("social_share_button.#{name.downcase}")].join("") html << link_to("","#", :rel => "nofollow #{rel}", "data-site" => name, :class => "social-share-button-#{name}", :onclick => "return SocialShareButton.share($(this).data('site'), $(this).parent().data('title'));", :title => h(link_title)) end html << "</div>" raw html.join("\n") end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
social-share-button-0.0.3 | lib/social_share_button/helper.rb |
social-share-button-0.0.2 | lib/social_share_button/helper.rb |