This gem packages rrssb for the Rails 3.2+ asset pipeline.
Installation
Add this line to your application's Gemfile:
gem 'rrssb-rails'
And then execute:
$ bundle
Or install it yourself as:
$ gem install rrssb-rails
Usage
To start using the rrssb-rails plugin in your Rails application, enable it via the asset pipeline.
If your server is running, you will need to restart Rails before using the gem.
Add the following to your JavaScript manifest file (application.js
):
Add the following to your style sheet file:
If you are using SCSS, modify your application.scss
file:
@import 'rrssb';
If you are using LESS, modify your application.less
file,
If you're using plain CSS, modify your application.css
file:
*= require rrssb
Helper
You can use the helper rrssb_tag
to generate and customize your social share buttons inside your view.
rrssb_tag(url: 'http://my_url.com', buttons: %w{facebook twitter google_plus})
For more information, see the dummy rails application available in /test
.
Tests
Run:
$ rake test
Contributing
- Fork it ( https://github.com/dam/rrssb-rails/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request