TODO: Write a gem description
Add this line to your application's Gemfile:
gem 'pdfjs-rails'
And then execute:
$ bundle
Or install it yourself as:
$ gem install pdfjs-rails
After bundling, add in application.js
//= require pdfviewer
and in aplication.css
*= require viewer
In a view you can call the following, assuming @course.slides contains the path to the PDF file.
= pdf_viewer @course.slides
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Added some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request