Module: Integral::SocialHelper
- Included in:
- ApplicationHelper
- Defined in:
- app/helpers/integral/social_helper.rb
Overview
Social Helper which contains methods relating to social networking
Instance Method Summary collapse
-
#facebook_share_url(opts = {}) ⇒ String
Facebook social sharing URL snippet built from - sharingbuttons.io/.
-
#facebook_url ⇒ String
Facebook Profile URL set from within Backend Settings area.
-
#github_url ⇒ String
Github URL set from within Backend Settings area.
-
#instagram_url ⇒ String
Instagram Profile URL set from within Backend Settings area.
-
#linkedin_share_url(opts = {}) ⇒ String
Linkedin social sharing URL snippet built from - sharingbuttons.io/.
-
#linkedin_url ⇒ String
Linkedin Profile URL set from within Backend Settings area.
-
#twitter_share_url(opts = {}) ⇒ String
Twitter social sharing URL snippet built from - sharingbuttons.io/.
-
#twitter_url ⇒ String
Twitter Profile URL set from within Backend Settings area.
-
#youtube_url ⇒ String
Youtube Profile URL set from within Backend Settings area.
Instance Method Details
#facebook_share_url(opts = {}) ⇒ String
Facebook social sharing URL snippet built from - sharingbuttons.io/
30 31 32 33 34 35 36 37 |
# File 'app/helpers/integral/social_helper.rb', line 30 def facebook_share_url(opts = {}) page_url = opts.fetch(:url, request.original_url) page_url = CGI.escape(page_url) share_url = "https://facebook.com/sharer/sharer.php?u=#{page_url}" share_url end |
#facebook_url ⇒ String
Facebook Profile URL set from within Backend Settings area
75 76 77 |
# File 'app/helpers/integral/social_helper.rb', line 75 def facebook_url Settings.facebook_url end |
#github_url ⇒ String
Github URL set from within Backend Settings area
61 62 63 |
# File 'app/helpers/integral/social_helper.rb', line 61 def github_url Settings.github_url end |
#instagram_url ⇒ String
Instagram Profile URL set from within Backend Settings area
96 97 98 |
# File 'app/helpers/integral/social_helper.rb', line 96 def instagram_url Settings.instagram_url end |
#linkedin_share_url(opts = {}) ⇒ String
Linkedin social sharing URL snippet built from - sharingbuttons.io/
47 48 49 50 51 52 53 54 55 56 |
# File 'app/helpers/integral/social_helper.rb', line 47 def linkedin_share_url(opts = {}) page_url = opts.fetch(:url, request.original_url) = opts.fetch(:message, '') page_url = CGI.escape(page_url) share_url = "https://www.linkedin.com/shareArticle?mini=true&url=#{page_url}" share_url += "&title=#{CGI.escape()}" if .present? share_url end |
#linkedin_url ⇒ String
Linkedin Profile URL set from within Backend Settings area
89 90 91 |
# File 'app/helpers/integral/social_helper.rb', line 89 def linkedin_url Settings.linkedin_url end |
#twitter_share_url(opts = {}) ⇒ String
Twitter social sharing URL snippet built from - sharingbuttons.io/
12 13 14 15 16 17 18 19 20 21 |
# File 'app/helpers/integral/social_helper.rb', line 12 def twitter_share_url(opts = {}) page_url = opts.fetch(:url, request.original_url) = opts.fetch(:message, '') page_url = CGI.escape(page_url) share_url = "https://twitter.com/intent/tweet/?url=#{page_url}" share_url += "&text=#{CGI.escape()}" if .present? share_url end |
#twitter_url ⇒ String
Twitter Profile URL set from within Backend Settings area
68 69 70 |
# File 'app/helpers/integral/social_helper.rb', line 68 def twitter_url Settings.twitter_url end |
#youtube_url ⇒ String
Youtube Profile URL set from within Backend Settings area
82 83 84 |
# File 'app/helpers/integral/social_helper.rb', line 82 def youtube_url Settings.youtube_url end |