Module: Kinney::SocialHelper
- Defined in:
- app/helpers/kinney/social_helper.rb
Instance Method Summary collapse
- #email_to_resource ⇒ Object
- #facebook_url_for_resource ⇒ Object
- #googleplus_url_for_resource ⇒ Object
- #twitter_url_for_resource ⇒ Object
Instance Method Details
#email_to_resource ⇒ Object
4 5 6 7 8 |
# File 'app/helpers/kinney/social_helper.rb', line 4 def email_to_resource body = url_encode "#{@clip.people_with_title} #{current_url}" subject = t('kinney.clips.show.mailto_subject') "mailto:?subject=#{subject}&body=#{body}" end |
#facebook_url_for_resource ⇒ Object
15 16 17 18 |
# File 'app/helpers/kinney/social_helper.rb', line 15 def facebook_url_for_resource url_params = {u:current_url, title: @clip.people_with_title} "http://www.facebook.com/share.php?#{url_params.to_query}" end |
#googleplus_url_for_resource ⇒ Object
10 11 12 13 |
# File 'app/helpers/kinney/social_helper.rb', line 10 def googleplus_url_for_resource url_params = {url: current_url} "https://plus.google.com/share?#{url_params.to_query}" end |
#twitter_url_for_resource ⇒ Object
20 21 22 23 |
# File 'app/helpers/kinney/social_helper.rb', line 20 def twitter_url_for_resource url_params = {text: @clip.people_with_title , url: current_url, via: t('kinney.clips.show.twitter_via')} "http://twitter.com/share?#{url_params.to_query}" end |