Module: SocialSharePrivacyHelper

Defined in:
app/helpers/social_share_privacy_helper.rb

Instance Method Summary collapse

Instance Method Details

#social_buttonsObject



3
4
5
6
7
8
9
# File 'app/helpers/social_share_privacy_helper.rb', line 3

def social_buttons
  options = social_share_privacy_config.to_s
  result = []
  result << '<div class="social_buttons"></div>'
  result << javascript_tag("jQuery(document).ready(function($) { $('.social_buttons').socialSharePrivacy(#{options}) });")
  raw(result.join("\n"))
end

#social_share_privacy_configObject



11
12
13
14
15
16
17
18
# File 'app/helpers/social_share_privacy_helper.rb', line 11

def social_share_privacy_config
  if @social_share_privacy_config.nil? ||
    @last_request != request
    @social_share_privacy = SocialSharePrivacy.config.eval(self)
    @last_request = request
  end
  @social_share_privacy
end