NivoSlider is one of the most Javascript slider. There was unfortunately no good integration for Ruby on Rails so I write my own. Feel free to contribute to improve this project if you want.
This gem requires Rails 3.1+ (with the asset pipeline enabled).
First, add this to your Gemfile:
gem 'nivo-rails'
Then run the bundle
command to install the gem.
This gem provides files required to setup correctly NivoSlider to your site. It requires few lines of code to make a slideshow works. First, edit your application.css
file and add at the top:
*= require nivo
Just make the same thing in your javascript application file:
# require nivo
That's it! You can now make slideshows in your web pages easily. The code required by NivoSlider is pretty boring to write. You can simply use the nivo_slider
helper like that:
<%= nivo_slider do %>
<%= image_tag "foo.png", :title => "Caption" %>
<%= image_tag "bar.png" %>
<% end %>
Enjoy!
- Fork it
- 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 new Pull Request
This project is released under the MIT license. Please see the LICENSE
file for more information.