Renderpdfasview
A simple RubyGem to render views in Rails Application in PDF format
Installation
Add this line to your application's Gemfile:
gem 'renderpdfasview'
And then execute:
$ bundle
Or install it yourself as:
$ gem install renderpdfasview
Usage
class UserController < ApplicationController
def index
respond_to do |format|
format.html
format.pdf { render :pdf => "pdfname" }
end
end
end
Contributing
- 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