Skip to content
RY

Adding social share buttons in rails application by using 'shareable' gem

Ram Laxman Yadav1 min read

However in practice you need to add social sharing buttons inside your rails applications. Its very easy to add social buttons in rails application by using ‘shareable’ gem.

here is an example:

Install Gem

put gem ‘shareable’ in your gem file. then run

bundle install.

Show buttons in rails view:

put ruby <%= render_shareable %> in your view this will add default buttons in your view.

Customizing buttons:

you can customize buttons by using the helper methods. for more detail click here.