Adding social share buttons in rails application by using 'shareable' gem | Ram Laxman Yadav

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

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

 <%= 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.

Ram Laxman Yadav
Ram Laxman Yadav
Ruby on Rails Developer