Social Share Button Gem for Rails Apps
Install social share button for your Rails app in just 5 minutes.
Add the gem to the Gemfile.
Install the gem and generate the config files.
$ bundle install $ rails generate social_share_button:install
//= require social-share-button
Add the import statement for the CSS in application.scss file:
Add the share button helper to article show page:
<%= social_share_button_tag(@article.title) %>
You will now see the social media share buttons as seen on this page.
In this article, you learned how to use the social-share-button gem to add social share buttons to your Rails app.
Ace the Technical Interview
- Easily find the gaps in your knowledge
- Get customized lessons based on where you are
- Take consistent action everyday
- Builtin accountability to keep you on track
- You will solve bigger problems over time
- Get the job of your dreams
Take the 30 Day Coding Skills Challenge
Gain confidence to attend the interview