Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Easy helper methods for adding custom social share buttons (Facebook, Twitter, and Google+) to your Rails app.
Add this line to your application's Gemfile:
gem 'social_share'
And then execute:
$ bundle
Or install it yourself as:
$ gem install social_share
in application.js
//= require 'social_share'
in application.css
*= require social_share
The current social service options are [:facebook, :twitter, :google_plus, :pinterest, :reddit, :tumblr, :stumbleupon]
The social_share
method takes a title, a url, and an optional services argument (defaults to Facebook and Twitter) as well as an optional more_services option (defaults to everything except Facebook and Twitter).
<%= social_share(@video.title, video_path(@video), services: [:facebook, :twitter, :google_plus]) %>
Gotchas
The Pinterest button will only be generated if you include the optional image argument:
<%= social_share(@video.title, video_path(@video), image: 'https://placekitten.com/g/500/300') %>
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)FAQs
Unknown package
We found that social_share demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.