Module: SocialMediaHelper

Defined in:
app/helpers/social_media_helper.rb

Overview

View helper: social media.

Instance Method Summary collapse

Instance Method Details

#social_share_buttons(options = {}) ⇒ String

Renders the social share buttons partial.

Parameters:

  • options (Hash) (defaults to: {})

    locals forwarded to the www/social/_share_buttons partial

Options Hash (options):

  • url (String)

    URL to share

  • title (String)

    share title

  • description (String)

    share description (defaults to the title)

  • layout (Symbol)

    :horizontal, :vertical, or :compact (defaults to :horizontal)

  • show_label (Boolean)

    show a text label next to each icon (defaults to false)

  • campaign (String)

    UTM campaign name (defaults to 'blog-share')

  • platforms (Array<Symbol>)

    platforms to render buttons for

Returns:

  • (String)

    the rendered partial HTML



14
15
16
# File 'app/helpers/social_media_helper.rb', line 14

def social_share_buttons(options = {})
  render partial: 'www/social/share_buttons', locals: options
end